diff --git a/src/app/credentials/[credentialId]/page.tsx b/src/app/credentials/[credentialId]/page.tsx index 7eca8fc..837248e 100644 --- a/src/app/credentials/[credentialId]/page.tsx +++ b/src/app/credentials/[credentialId]/page.tsx @@ -17,6 +17,9 @@ import { CheckCircle, Download, ShieldCheck, + Award, + Hash, + Key, } from "lucide-react"; import { useState, useCallback } from "react"; @@ -143,6 +146,41 @@ export default function CredentialDetailPage({

+
+ +
+

Credential ID

+

+ {truncateAddress(credential.id, 8)} +

+
+
+ {credential.metadata.score && ( +
+ +
+

Score

+

{credential.metadata.score}%

+
+
+ )} + {credential.txHash && ( +
+ +
+

Transaction

+ + {truncateAddress(credential.txHash, 8)} + + +
+
+ )} {/* Learner Address */} diff --git a/src/app/settings/page.tsx b/src/app/settings/page.tsx index ac1f8e0..d52441d 100644 --- a/src/app/settings/page.tsx +++ b/src/app/settings/page.tsx @@ -1,4 +1,5 @@ "use client"; +// User profile settings page import { useEffect, useState } from "react"; import { useRouter } from "next/navigation"; diff --git a/src/components/rewards/claim-button.tsx b/src/components/rewards/claim-button.tsx index 4e862f3..4d3b39a 100644 --- a/src/components/rewards/claim-button.tsx +++ b/src/components/rewards/claim-button.tsx @@ -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; diff --git a/src/lib/hooks/use-auth.ts b/src/lib/hooks/use-auth.ts index 3daadb6..ba72fa4 100644 --- a/src/lib/hooks/use-auth.ts +++ b/src/lib/hooks/use-auth.ts @@ -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(); diff --git a/src/types/stellar.ts b/src/types/stellar.ts index 24584bf..aa03e57 100644 --- a/src/types/stellar.ts +++ b/src/types/stellar.ts @@ -29,6 +29,7 @@ export interface CredentialNFT { courseId: string; courseTitle: string; issuedAt: string; + txHash?: string; metadata: CredentialMetadata; }