fix: send hardware payment proofs - #1199
Conversation
Greptile SummaryThis PR extends incoming on-chain Paykit payment proofs to hardware-wallet sends while preserving preparation idempotency and the existing request-consumption order.
Confidence Score: 5/5The PR appears safe to merge based on the reviewed hardware-send and payment-proof paths. The hardware flow prepares the proof before broadcast, retains existing contact-payment preparation safeguards, completes the proof with the broadcast transaction ID, and handles repository failures without interrupting payment-success navigation.
|
| Filename | Overview |
|---|---|
| app/src/main/java/to/bitkit/viewmodels/AppViewModel.kt | Adds idempotent hardware proof preparation and transaction-ID-based proof completion without an accepted correctness issue. |
| app/src/main/java/to/bitkit/ui/sheets/SendSheet.kt | Completes the hardware payment proof before advancing the successful broadcast flow. |
| app/src/test/java/to/bitkit/viewmodels/AppViewModelSendFlowTest.kt | Verifies proof preparation ordering, repeated preparation behavior, and completion with the broadcast transaction ID. |
Sequence Diagram
sequenceDiagram
participant U as User
participant H as Hardware send
participant A as AppViewModel
participant P as Paykit proof repository
participant W as Hardware wallet
U->>H: Confirm hardware payment
H->>W: Sign transaction
W-->>H: Signed transaction
H->>A: prepareHardwareContactPayment()
A->>P: Prepare payment proof
A->>A: Consume private list and accept request
A-->>H: Preparation succeeded
H->>H: Broadcast signed transaction
H-->>A: Transaction ID
A->>P: Complete proof with transaction ID
A->>A: Show payment success
Reviews (1): Last reviewed commit: "fix: send hardware payment proofs" | Re-trigger Greptile
48f0d0a to
82d6c73
Compare
82d6c73 to
e1053b0
Compare
e9ce645 to
ad132c8
Compare
850c252 to
bac8656
Compare
f08381d to
1eee260
Compare
bac8656 to
6bb8501
Compare
1eee260 to
e819704
Compare
6bb8501 to
7a6646c
Compare
e819704 to
f17eff8
Compare
7a6646c to
a92ca77
Compare
c72a4c3 to
10ff0df
Compare
a92ca77 to
af462ca
Compare
|
Starting review |
af462ca to
1d50070
Compare
d0bf6c2 to
e84d74a
Compare
e84d74a to
35c0b4c
Compare
16c7158 to
1769cb2
Compare
|
Follow-up: current signed head is |
This PR sends Paykit payment proofs for on-chain payment requests paid from a hardware wallet. It is stacked on #1178 so the proof-delivery changes remain isolated from the subscription work.
Description
Preview
N/A
QA Notes
Manual Tests
regression:hardware broadcast retry → retry the same signed transaction: the request is not accepted twice and the private Payment List is not consumed twice.Automated Checks
AppViewModelSendFlowTest.kt: verifies hardware proof preparation ordering and idempotency, plus proof completion with the broadcast transaction ID../gradlew testDevDebugUnitTest --tests 'to.bitkit.viewmodels.AppViewModelSendFlowTest'