Surface failed and pending outbound payments in list_transactions#89
Open
hash-money wants to merge 1 commit into
Open
Surface failed and pending outbound payments in list_transactions#89hash-money wants to merge 1 commit into
hash-money wants to merge 1 commit into
Conversation
Both mapping paths hid every non-Completed payment. The comment justified hiding issued-but-unpaid inbound invoices, but the condition also swallowed failed and in-flight *outbound* payments — a failed send leaves no record in the wallet's transaction list at all, and a UI built on list_transactions cannot show the user what happened. Hide only non-completed inbound records (unpaid invoices/quotes stay noise); outbound attempts always surface. Applies to both the self-custodial path (should_surface_lightning_payment_without_metadata gains the direction) and the trusted-payment fallback branch. Observed downstream (emergent-money/graduated-wallet#328): a failed BOLT11 send was absent from history while the UI already renders a 'failed' status for records it receives.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
list_transactionscurrently hides every payment whose status isn'tCompleted, on both mapping paths. The comment justifies hiding issued-but-unpaid inbound invoices — but the condition also swallows failed and in-flight outbound payments, so a failed send leaves no record at all. A wallet UI built onlist_transactionscan't show users what happened to a payment they made (downstream report: emergent-money/graduated-wallet#328 — our UI already renders afailedstatus for records it receives, they just never arrive).This keeps the unpaid-inbound filtering and surfaces outbound attempts regardless of status:
should_surface_lightning_payment_without_metadatagains the payment direction; outbound always surfaces.!outbound &&guard.Unit tests: failed/pending outbound listed, inbound failure (expired unpaid invoice) still hidden; existing pending-onchain cases updated for the new parameter.
cargo test -p orange-sdk --lib17/17.