Keep bounty payout payment details in-app#252
Conversation
Greptile SummaryThis PR switches bounty payouts from a hosted-checkout redirect flow to an in-app payment detail display, stores the payment address/amount/currency/expiry in
Confidence Score: 5/5Safe to merge — all changed logic paths are covered by tests, and no regressions were found in the three modified files. Both previously flagged issues (always-null checkout_url in client state, and no guard against re-invoicing paid submissions) are properly fixed. The fall-through migration path for old hosted-checkout rows is correctly scoped to rows missing metadata.payment_address, the UI button condition and label are consistent with the new server logic, and new tests cover the two added code paths end-to-end. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[POST /pay] --> B{payout_status is paid?}
B -- Yes --> C[400 Already Paid]
B -- No --> D{coinpay_invoice_id AND metadata.payment_address present?}
D -- Yes --> E[Return cached in-app details]
D -- No --> G[Call createPayment via CoinPay API]
G --> I{payment_id AND address returned?}
I -- No --> J[502 No usable payment]
I -- Yes --> K[Update DB: payout_status=invoiced, pay_url=null, store address in metadata]
K --> L[200 Return in-app payment details]
style C fill:#f87171
style J fill:#f87171
style E fill:#86efac
style L fill:#86efac
Reviews (2): Last reviewed commit: "fix(bounties): preserve completed payout..." | Re-trigger Greptile |
Summary
pay_urlnull for new bounty paymentsQA
Notes
This supersedes the earlier conflicting PRs (#241/#244). Branch is based before the new workflow commit to avoid the contributor token workflow-scope push restriction; local merge test against current
origin/masterwas clean.