Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions src/app/credentials/[credentialId]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ import {
CheckCircle,
Download,
ShieldCheck,
Award,
Hash,
Key,
} from "lucide-react";
import { useState, useCallback } from "react";

Expand Down Expand Up @@ -143,6 +146,41 @@ export default function CredentialDetailPage({
</p>
</div>
</div>
<div className="flex items-center gap-2 text-sm">
<Key className="h-4 w-4 text-gray-400" />
<div>
<p className="text-gray-500">Credential ID</p>
<p className="font-mono text-xs">
{truncateAddress(credential.id, 8)}
</p>
</div>
</div>
{credential.metadata.score && (
<div className="flex items-center gap-2 text-sm">
<Award className="h-4 w-4 text-gray-400" />
<div>
<p className="text-gray-500">Score</p>
<p className="font-medium">{credential.metadata.score}%</p>
</div>
</div>
)}
{credential.txHash && (
<div className="flex items-center gap-2 text-sm">
<Hash className="h-4 w-4 text-gray-400" />
<div>
<p className="text-gray-500">Transaction</p>
<a
href={`https://stellar.expert/explorer/testnet/tx/${credential.txHash}`}
target="_blank"
rel="noreferrer"
className="font-mono text-xs text-blue-600 hover:underline flex items-center gap-1"
>
{truncateAddress(credential.txHash, 8)}
<ExternalLink className="h-3 w-3" />
</a>
</div>
</div>
)}
</div>

{/* Learner Address */}
Expand Down
1 change: 1 addition & 0 deletions src/app/settings/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"use client";
// User profile settings page

import { useEffect, useState } from "react";
import { useRouter } from "next/navigation";
Expand Down
2 changes: 1 addition & 1 deletion src/components/rewards/claim-button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { Button } from "@/components/ui/button";
import { Gift } from "lucide-react";
import { useState } from "react";
import { RewardClaimDialog } from "./reward-claim-dialog";
import { RewardClaimDialog } from "./reward-claim-dialog"; // Reward claim dialog wrapper

interface ClaimButtonProps {
claimableId: string;
Expand Down
1 change: 1 addition & 0 deletions src/lib/hooks/use-auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export interface WalletError {
resolution: string;
}

// Helper to classify wallet errors
function classifyWalletError(err: unknown, currentNetwork: string): WalletError {
const msg = err instanceof Error ? err.message : String(err);
const lower = msg.toLowerCase();
Expand Down
1 change: 1 addition & 0 deletions src/types/stellar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export interface CredentialNFT {
courseId: string;
courseTitle: string;
issuedAt: string;
txHash?: string;
metadata: CredentialMetadata;
}

Expand Down