diff --git a/src/hooks/cashu/useHistoryManager.ts b/src/hooks/cashu/useHistoryManager.ts index 94a1070..55f8296 100644 --- a/src/hooks/cashu/useHistoryManager.ts +++ b/src/hooks/cashu/useHistoryManager.ts @@ -21,7 +21,23 @@ export function useHistoryManager({ try { setIsLoadingHistory(true); const entries = await coco.history.getPaginatedHistory(0, 50); // TODO: show entire history - setHistoryEntries(entries); + + // Filter out unpaid quotes: only show completed transactions + // - Mint quotes: only show 'ISSUED' (completed) + // - Melt quotes: only show 'PAID' (completed) + // - Send/Receive: show all (no state field) + const filteredEntries = entries.filter((entry) => { + if (entry.type === 'mint') { + return entry.state === 'ISSUED'; + } + if (entry.type === 'melt') { + return entry.state === 'PAID'; + } + // Send and receive entries don't have a state field, show all + return true; + }); + + setHistoryEntries(filteredEntries); } catch (err) { console.error('Failed to load history:', err); } finally {