diff --git a/src/hooks/useMintDirectory.ts b/src/hooks/useMintDirectory.ts index 509b40c..c321361 100644 --- a/src/hooks/useMintDirectory.ts +++ b/src/hooks/useMintDirectory.ts @@ -31,6 +31,34 @@ export interface MintDirectoryEntry { nutCount?: number; tosUrl?: string; lastOnlineAt?: string; + + // ── Community signal MintRadar also returns (previously unused) ──────────── + /** Average community rating, 0–5. */ + reviewAvgRating?: number; + /** How many community ratings back the average. */ + reviewCount?: number; + /** Rating after MintRadar's own weighting. */ + reviewWeightedRating?: number; + /** 0–100 composite reliability score. */ + reliabilityScore?: number; + uptimePct24h?: number; + uptimePct7d?: number; + /** Liveness audit volume — tokens actually minted/melted through it. */ + auditNMints?: number; + auditNMelts?: number; + auditNErrors?: number; + auditRecentErrors?: number; + auditRecentTotal?: number; + auditCheckedAt?: string; + serverLocation?: string; + units?: string[]; + mintMethods?: Array<{ unit?: string; method?: string; min_amount?: number; max_amount?: number }>; + meltMethods?: Array<{ unit?: string; method?: string; min_amount?: number; max_amount?: number }>; + /** The mint's own Nostr announcement key, when it publishes one. */ + pubkey?: string; + nostrAnnouncedAt?: string; + discoveredAt?: string; + lastError?: string | null; } const SITE_ORIGIN = 'https://skate-spots.org'; diff --git a/src/pages/MintsPage.tsx b/src/pages/MintsPage.tsx index 25f70f8..dfdf49a 100644 --- a/src/pages/MintsPage.tsx +++ b/src/pages/MintsPage.tsx @@ -12,7 +12,7 @@ import { useCashu } from '@/hooks/wallet/useCashu'; import { useToast } from '@/hooks/useToast'; import { isNativePlatform } from '@/lib/platform'; import { cn } from '@/lib/utils'; -import { Search, Coins, ExternalLink, Plus, Loader2, Check, ShieldAlert, Activity, ChevronRight, Copy, Info } from 'lucide-react'; +import { Search, Coins, ExternalLink, Plus, Loader2, Check, ShieldAlert, Activity, ChevronRight, Copy, Info, Star } from 'lucide-react'; function hostOf(url: string): string { try { @@ -112,6 +112,27 @@ function MintRow({ )} + + {/* Community signal — ratings + reliability from MintRadar. */} + {((typeof mint.reviewAvgRating === 'number' && (mint.reviewCount ?? 0) > 0) || + typeof mint.reliabilityScore === 'number' || + typeof mint.uptimePct24h === 'number') && ( +
+
+