feat: send paykit payment proofs - #1178
Conversation
This comment has been minimized.
This comment has been minimized.
b2af2d9 to
a6bd188
Compare
ovitrif
left a comment
There was a problem hiding this comment.
Two Lightning test gaps are missing:
- Crash recovery after an associated hash never exercises the LDK lookup, so a broken preimage path would not fail.
- Incoming-request send never asserts prepare, associate, pending keep, or fail-plus-cancel, so a skipped hash association would not fail.
ovitrif
left a comment
There was a problem hiding this comment.
Looks good: associated-hash Lightning crash recovery now submits from an LDK succeeded payment, and incoming-request send keeps or clears the proof correlation as required.
56ce990 to
531578e
Compare
|
Will test after conflicts are resolved. |
9e4ee27 to
19823e6
Compare
|
Root cause and logs for the disabled swipe in the review above. Why it's disabled
enabled = uiState.isAmountInputValid && !uiState.isFundingSourceLoading && !isHardwareFeeLoading
navigateToSendRoute(fromMainScanner, SendRoute.Confirm, SendEffect.NavigateToConfirm)
refreshOnchainSendIfNeeded()
estimateLightningRoutingFeesIfNeeded()
returnThe sibling branch eight lines below ( Confirmed on deviceTwo emulators on this branch build, each with its own pubky identity on the staging homeserver, added as contacts; B requested 16 000 sats from A.
Worth flagging that the funding-source toggle is only a workaround because that wallet had a paired Trezor. Looks like a one-liner — assign The proof pipeline itself works once past thisSame run, payer side: That is and the request moved from "Waiting for … to pay" into the settled group. A force-stop and relaunch of the payer produced no re-submission and no leftover pending record, and there were no Paykit warnings or errors on either device. |
|
Fixed the disabled incoming-request swipe in 6d66ab6. The request branch validated the amount but did not persist that result, so Send Confirm kept the swipe disabled. It now writes the validation result before navigation, and the existing incoming payment request opens the existing confirm flow with its fixed amount test asserts that isAmountInputValid is true. The focused test and full unit suite pass. |
|
The conflicts are resolved and the branch is current. It also now includes the proof-store/polling hardening and the disabled-swipe fix reported in the latest review. Please retest at 6d66ab6. |
e9ce645 to
ad132c8
Compare
|
Retested latest revision, Pixel emu ↔ iPhone 17 sim (same session as ios #683). Incoming request pay on Android goes to Confirm with the amount locked. That matches this side — the amount-pad leak is iOS only (see #683). Request lists don’t match
Not amount-keyed overwrite in the app list — IDs are Screenshot (Payment Requests list): Logs: Proofs still queued on the successful pays (LN + on-chain both ways). List drift looks like a follow-up, not a proofs blocker. |
|
Thanks for confirming the Android amount path is correct. I also reran the clean cross-platform proof/history portion against the current Android and iOS heads: two requests succeeded in each direction, both apps ended with the same four history rows, and each remote request transitioned to paid after the payer logged durable proof-outbox acceptance. I could not reproduce a stuck proof or history divergence on clean state, so there is no speculative Android change for those observations. All Android checks are green on |
ovitrif
left a comment
There was a problem hiding this comment.
The incoming-request swipe assignment in onScanOnchain still has no test that would fail if it were removed. The new isAmountInputValid assertion is on a lightning presentation that already sets that flag in onScanLightning.
0a7f4e4 to
c72a4c3
Compare
c72a4c3 to
10ff0df
Compare
piotr-iohk
left a comment
There was a problem hiding this comment.
QA LGTM.
Retested latest (10ff0df) Pixel emu ↔ iPhone 17 sim, regtest. 2 requests from each side (1k LN + 25k on-chain), all 4 paid.
- Incoming request pay stays on Confirm, amount locked
- Proofs queued after both LN pays and both on-chain pays (
Queued a Paykit payment proof for private delivery) - No proof UI, as expected
- No
Failed to prepare/complete/reconcileor ignored-proof warnings
Payment Requests lists still diverge after the same session (3 rows each, different missing amount). Follow-up: #1219 (ios twin: synonymdev/bitkit-ios#723). Not a proofs blocker.

This PR sends a Paykit payment proof back to the requester after Bitkit successfully pays an incoming private payment request.
Description
This PR is stacked on #1172. Companion iOS PR: synonymdev/bitkit-ios#683
Preview
N/A — there are no UI changes.
QA Notes
Manual Tests
Automated Checks
PaykitPaymentProofRepoTest.kt: 8 tests cover restart retry, duplicate suppression, invalid Lightning preimage rejection, failed-payment cleanup, exact on-chain proof submission, overlapping retries, wallet-store clearing, and completed-proof persistence failure.AppViewModelSendFlowTest.kt: covers proof persistence before private-list consumption and request acceptance, plus successful and failed payment lifecycle handling.git diff --checkpassed.