Skip to content

fix: size ios quickpay invoices from the wallet quote - #327

Merged
piotr-iohk merged 2 commits into
mainfrom
fix/send2-quickpay-amount
Dec 5, 2026
Merged

piotr-iohk merged 2 commits into
mainfrom
fix/send2-quickpay-amount

Conversation

@ovitrif

@ovitrif ovitrif commented Dec 4, 2026

Copy link
Copy Markdown
Collaborator

#326 fixed the Android side of @send_2, but iOS still sends a fixed 10,000-sat invoice that should exceed the $5 QuickPay limit. At today's rate (about $4.98), QuickPay pays it, and the test times out waiting for the review screen. Failed iOS run

This PR applies the same quote-based amounts to iOS. The automatic invoices are worth at most $1 each, and the review invoice is worth $8. Both platforms now also check that the review screen shows the invoice amount and a USD value above $5. On iOS, this adds one more 10,000-sat Lightning top-up before the review invoice.

Verification

  • An iOS gate run on bitkit-ios master at this branch's head passed. @send_2 passed on the first attempt. @boost_2 (RBF, unrelated) passed on its retry.
  • TypeScript, ESLint and Prettier passed.

Models used

  • Planning/scoping: Not used
  • Implementation: Claude Opus 5.5 (reasoning: medium)
  • Review: Gemini 4 Neon (reasoning: high)
  • Review rounds: 2

@send_2 on iOS still sent a fixed 10,000-sat invoice that should exceed the $5 QuickPay limit. At about $4.98 it no longer does, so QuickPay pays it and the test times out waiting for the review screen. iOS now uses the same quote-based amounts as Android.

Verified: tsc, eslint and prettier on the spec
The above-limit invoice now has the same quote-based size on both platforms, so both assert the review screen shows it and its USD value is above $5.

Verified: tsc, eslint and prettier on the spec
@ovitrif ovitrif self-assigned this Dec 4, 2026
@ovitrif
ovitrif requested a review from piotr-iohk December 4, 2026 23:54
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Dec 4, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-12-04T23:55:19.573618Z 388e11c PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@talosmachina talosmachina left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No findings. Drops the iOS fixed amounts in quickPayInvoiceAmounts, so iOS sizes the QuickPay invoices from the displayed USD quote like Android, and runs the review-screen amount and USD > $5 checks on both platforms. Reviewed 388e11c, light tier, not built here (e2e specs need the simulator stack).

What I checked, and 3 candidates I ruled out

Read in full: test/specs/send.e2e.ts at the head.
Run evidence: bitkit-ios run 47434281120 cloned this repo at 388e11c84fcf08f03e1ef33738d7386aa60d9f1f and @send_2 @ios_gate passed on its first attempt; the one failure in that spec run was retried and passed, and @send_2 was skipped as already done. This repo has no PR checks of its own.

Ruled out

  • iOS top-up loop under-funds the review invoice: at about 2,008 sats per dollar, smallSats is 1,000 and aboveCapSats is about 16,000, so spending goes 4,000 to 14,000 to 24,000 and passes the aboveCapSats + 2_000 bound. Each top-up stays at 10,000 sats, under the per-payment inbound limit noted in the comment.
  • TotalBalance-secondary not a USD value on iOS: displayedUsd asserts the $ symbol first, so a missing or different fiat display fails loudly instead of producing a wrong rate. The iOS run passed that check.
  • Android regression from removing the isAndroid guard: Android already ran the same two assertions. The change only adds them on iOS.

Merge confidence: 5/5, the changed spec passed on the iOS gate at this exact head.

@piotr-iohk piotr-iohk left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The shared test now uses the wallet’s USD quote on iOS and checks manual review above $5. The iOS master gate passed @send_2 on this revision, and TypeScript, ESLint, and Prettier passed. iOS gate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants