Skip to content

fix(lightning): use actual probe result#522

Merged
pwltr merged 1 commit intomasterfrom
fix/probing
Apr 29, 2026
Merged

fix(lightning): use actual probe result#522
pwltr merged 1 commit intomasterfrom
fix/probing

Conversation

@pwltr
Copy link
Copy Markdown
Contributor

@pwltr pwltr commented Apr 8, 2026

Description

Before this change, the probing flow always returned success for any sent probe. Now it uses the paymentIds from the returned probe handles, waits for matching .probeSuccessful / .probeFailed events, and updates the UI to use the actual result. Also adds send probes via keysend.

Details

  • LightningService.sendProbe returns dispatched probe paymentIds (ProbeDispatch).
  • WalletViewModel.waitForProbeOutcome matches on those IDs, uses a small in-memory cache so events aren’t missed between dispatch and registering the listener, clears cache on node stop / wipe.
  • Multi-path probes: resolve on first success, or after all tracked probes fail.

Needs synonymdev/ldk-node#77

Screenshot / Video

Simulator.Screen.Recording.-.iPhone.17.-.2026-04-08.at.18.48.21.mov

@pwltr pwltr marked this pull request as draft April 8, 2026 16:54
@pwltr pwltr marked this pull request as ready for review April 29, 2026 08:52
@pwltr pwltr requested review from ovitrif and piotr-iohk April 29, 2026 08:52
Comment thread CHANGELOG.md Outdated
Comment thread Bitkit/ViewModels/WalletViewModel.swift Outdated
Comment thread Bitkit/ViewModels/WalletViewModel.swift
@pwltr pwltr self-assigned this Apr 29, 2026
@pwltr pwltr added this to the 2.3.0 milestone Apr 29, 2026
Copy link
Copy Markdown
Collaborator

@piotr-iohk piotr-iohk left a comment

Choose a reason for hiding this comment

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

LGTM.
(Useful follow-up would be to support LNURL-pay / Lightning Address in the probing tool.)

Copy link
Copy Markdown
Collaborator

@ovitrif ovitrif left a comment

Choose a reason for hiding this comment

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

LGTM

Also tested send to:

  • WoS ✅
  • Phoenix ✅

Will do the rest of the testing together with Android, for the new scores snapshot.

@pwltr pwltr merged commit 76805bf into master Apr 29, 2026
15 checks passed
@pwltr pwltr deleted the fix/probing branch April 29, 2026 12:29
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.

3 participants