fix: properly handle async NostrSend calls for Kind 21002 responses #1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feature/nostr-send-async"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Fixes an issue where ShockWallet would show "Debit request failed" even though the payment succeeded, because Lightning.Pub wasn't properly sending Kind 21002 responses back to the wallet.
Problem
The
NostrSendtype was incorrectly typed as returningvoidwhen it actually returnsPromise<void>. This caused async errors to be silently swallowed when sending Kind 21002 (ndebit) responses.Solution
Promise<void>.catch()loggingCommits
fix(nostr): update NostrSend type to Promise<void> with error handlingfix(handlers): await NostrSend calls throughout codebaseFiles Changed
src/services/nostr/nostrPool.ts- Type definitionsrc/services/nostr/sender.ts- Sender implementation with error handlingsrc/services/nostr/handler.ts- Handler updatessrc/services/main/debitManager.ts- Debit response loggingsrc/nostrMiddleware.ts- Middleware signaturesrc/services/storage/tlv/tlvFilesStorageProcessor.ts- Storage signaturesrc/services/webRTC/index.ts- WebRTC handlerTest Plan
🤖 Generated with Claude Code