Skip to content

fix: remove hardcoded 10s timeout on NWC zap payments#368

Merged
barrydeen merged 1 commit into
mainfrom
fix/nwc-zap-timeout
Mar 30, 2026
Merged

fix: remove hardcoded 10s timeout on NWC zap payments#368
barrydeen merged 1 commit into
mainfrom
fix/nwc-zap-timeout

Conversation

@barrydeen
Copy link
Copy Markdown
Owner

Summary

  • Removed the hardcoded 10s timeout on NWC payInvoice requests — payments can take minutes to settle and the timeout was causing false error dialogs
  • Users were seeing "timed out" errors and retrying, resulting in double payments
  • NWC payInvoice now waits indefinitely for the wallet to respond (success or failure)
  • Connection-drop exceptions during payment are treated as in-flight (optimistic zap) rather than showing an error, since the wallet may still complete the payment

Test plan

  • Send a zap via NWC and verify no timeout error after 10s
  • Verify wallet-returned errors (e.g. insufficient balance) still show error dialog
  • Verify zap success animation plays normally for fast payments
  • Disconnect wallet mid-payment and verify no error dialog shown

Payments can take minutes to settle. The 10s timeout caused a false
error dialog prompting users to pay again, resulting in double payments.
NWC payInvoice now waits indefinitely for the wallet response, and
connection-drop exceptions are treated as in-flight rather than failed.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@barrydeen barrydeen merged commit d525297 into main Mar 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant