detect lightning payment and toast

This commit is contained in:
lemonknowsall committed 2025-10-12 13:01:18 -07:00
1 parent 967bdca369
commit 45918e86e2
3 files changed
+60 -9

No files matched your search

-6
View File
@@ -102,11 +102,6 @@ export function useCashuBalances(manager: unknown | null): UseCashuBalancesRetur
refreshBalances();
});
const unsubscribeMintQuoteRedeemed = (manager as { on: (event: string, handler: (payload: unknown) => void | Promise<void>) => () => void }).on('mintQuote:redeemed', () => {
console.log('💰 Mint quote redeemed, refreshing balances...');
refreshBalances();
});
const unsubscribeSendCreated = (manager as { on: (event: string, handler: (payload: unknown) => void | Promise<void>) => () => void }).on('send:created', () => {
console.log('📤 Send created, refreshing balances...');
// Bypass throttling for send operations to ensure immediate balance update
@@ -144,7 +139,6 @@ export function useCashuBalances(manager: unknown | null): UseCashuBalancesRetur
return () => {
unsubscribeProofsSaved();
unsubscribeProofsStateChanged();
unsubscribeMintQuoteRedeemed();
unsubscribeSendCreated();
unsubscribeReceiveCreated();
};