Skip to content

[nwc-ios]: fix lightning payment failures and improve persistent service initialization#4086

Merged
kaloudis merged 4 commits into
ZeusLN:nwc-ios-background-servicefrom
ajaysehwal:fix/lightning-payment-error
May 14, 2026
Merged

[nwc-ios]: fix lightning payment failures and improve persistent service initialization#4086
kaloudis merged 4 commits into
ZeusLN:nwc-ios-background-servicefrom
ajaysehwal:fix/lightning-payment-error

Conversation

@ajaysehwal
Copy link
Copy Markdown
Contributor

@ajaysehwal ajaysehwal commented May 12, 2026

Description

Relates to issue: ZEUS-4067

Please enter a description and screenshots, if appropriate, of the work covered in this PR

This pull request is categorized as a:

  • New feature
  • Bug fix
  • Code refactor
  • Configuration change
  • Locales update
  • Quality assurance
  • Other

Checklist

  • I’ve run yarn run tsc and made sure my code compiles correctly
  • I’ve run yarn run lint and made sure my code didn’t contain any problematic patterns
  • I’ve run yarn run prettier and made sure my code is formatted correctly
  • I’ve run yarn run test and made sure all of the tests pass

Testing

If you modified or added a utility file, did you add new unit tests?

  • No, I’m a fool
  • Yes
  • N/A

I have tested this PR on the following platforms (please specify OS version and phone model/VM):

  • Android
  • iOS

I have tested this PR with the following types of nodes (please specify node version and API version where appropriate):

On-device

  • LDK Node
  • Embedded LND

Remote

  • LND (REST)
  • LND (Lightning Node Connect)
  • Core Lightning (CLNRest)
  • Nostr Wallet Connect
  • LndHub

Locales

  • I’ve added new locale text that requires translations
  • I’m aware that new translations should be made on the ZEUS Transfix page and not directly to this repo

Third Party Dependencies and Packages

  • Contributors will need to run yarn after this PR is merged in
  • 3rd party dependencies have been modified:
    • verify that package.json and yarn.lock have been properly updated
    • verify that dependencies are installed for both iOS and Android platforms

Other:

  • Changes were made that require an update to the README
  • Changes were made that require an update to onboarding

@ajaysehwal ajaysehwal force-pushed the fix/lightning-payment-error branch from b1f57e6 to 6f1b4b1 Compare May 12, 2026 11:16
@ajaysehwal ajaysehwal changed the title [nwc-ios]: Fix lightning payment failures and improve persistent service initialization [nwc-ios]: fix lightning payment failures and improve persistent service initialization May 12, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refines the Nostr Wallet Connect (NWC) implementation by improving node switching behavior, background service management, and transaction handling. Key updates include a new reaction to reset the service during node switches, automatic iOS background monitoring for active connections, and enhanced activity views for failed payments. Review feedback identified a race condition in the node-switching reaction where the asynchronous reset is not awaited, a state management bug where the loading indicator is not cleared on service start failure, and a recommendation to include failed transactions in the transaction list to maintain complete history for clients.

Comment thread stores/NostrWalletConnectStore.ts
Comment thread stores/NostrWalletConnectStore.ts
Comment thread stores/NostrWalletConnectStore.ts Outdated
@ajaysehwal ajaysehwal force-pushed the fix/lightning-payment-error branch from 6f1b4b1 to 9b4ac5d Compare May 12, 2026 12:42
@kaloudis kaloudis merged commit 91296ab into ZeusLN:nwc-ios-background-service May 14, 2026
4 checks passed
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.

2 participants