fix: surface payment request details in sheet - #1337
Conversation
|
Regtest APKDownload bitkit-dev-debug universal APK (expires in 30 days). |
|
Pushed 2f74260: keeps the decoded invoice description in the Payment Request details when it differs from the request note, answering @pwltr's review comment. The Note row is hidden only when the two match, so Bitkit-to-Bitkit requests (empty invoice description) look unchanged. Checks: compile and detekt clean on the changed file. |
piotr-iohk
left a comment
There was a problem hiding this comment.
QA approve — Payment Request From/For sheet
Pinned: 2f74260. Twin: synonymdev/bitkit-ios#791 @ c4bdb4d5cc12.
Code: no actionable findings on the From/For row, details Invoice Note / Contact labeling, or empty-note layout.
Device: incoming request confirm opened on Android (Payer) after Requester sent from iOS; two on-chain Paykit payments completed (logs: Opened → Decoded → Consumed → sendOnChain for ~20k then 21k). First automated wait hit empty encrypted-link poll (delivery lag); after the request arrived, open → confirm → pay worked.
LGTM.
jvsena42
left a comment
There was a problem hiding this comment.
No HIGH/MEDIUM findings.
Checked and clean:
- From/For vs the request paid:
paymentRequestNote,isPaymentRequest,incomingPaymentRequestIdandcontactPaymentProfileare only written byresetSendState, whichhandleScancalls underscanMutexfrom the sameactiveContactPaymentContextright afterprepareContactPaymentContextForScan. The note and request id in the snapshot always belong to the decoded invoice. Pay-time guards still hold:onConfirmPayrejects a payment-request snapshot without an active context, andvalidateIncomingPaymentRequestrejects amount/invoice mismatch and non-pending requests. - Second request while the confirm is open: blocked by
isPaymentRequestPresentationBlocked; opening one manually hides the Send sheet and re-runshandleScan. - Back/cancel from Confirm: header Back and amount tap pop to Amount with the same request; sheet close runs
hideSheet→clearActiveContactPaymentContext. The staleSendUiStatefields that survive are reset on every re-entry (TabBar SendresetSendState, any scan/deeplink viahandleScan), andonConfirmPaywould reject a stale snapshot anyway. The note adds no new clearing obligation beyond the existingcontactPaymentProfile. - Requester text: From and For are single-line with ellipsis; the note is plain text and never reaches URLs, network calls or logs. The unbounded Invoice Note stays readable because
ContentRunningscrolls; iOS does not scroll there, flagged on synonymdev/bitkit-ios#791. - Subscriptions and LNURL keep their confirm; the Note row hides only when the trimmed invoice description equals the note.
- Gating: every entry point sits behind
PaykitFeatureFlags.isUiEnabled(default off). - Figma: matches the Payment Request and Confirm Details frames on
Bitkit - Refactor v63.
|
Pushed c00e726: the changelog entry now also says the request note stays in the payment details, and master is merged in. The Design section now names the spec's page: Send (Pay Payment Request) on Checks: compile, detekt and @piotr-iohk, re-requesting your review because the approval was on 2f74260; the code under review is unchanged. |
|
Pushed 4b5e73f: restores the original one-line changelog entry; the added detail about the payment details did not belong in release notes. |
Closes #1336
Twin: synonymdev/bitkit-ios#791
This PR shows who a Payment Request is from and what it is for on the Payment Request sheet, and keeps the request note in its details.
Description
request-summary.xmljourney and its identifiers to the Payment Request journeys.Out of Scope
Design
Send (Pay Payment Request) on the Bitkit - Refactor v63 page, added on 2026-09-24. It supersedes the Payment Request frames on
Bitkit - Handoff v62:Preview
Captured on an Android emulator receiving requests from an iOS simulator on regtest.
QA Notes
Journeys
request-summary.xml— the collapsed Payment Request sheet shows From and For, the details show the note as Invoice Note under a Contact recipient, and For is left out without a noteManual Tests
Automated Checks
AppViewModelSendFlowTest.kt— an opened request passes its note to the confirm sheet