Skip to content

Fix pos mode#494

Merged
dewabisma merged 4 commits into
mainfrom
beast/fix-pos-mode
May 22, 2026
Merged

Fix pos mode#494
dewabisma merged 4 commits into
mainfrom
beast/fix-pos-mode

Conversation

@dewabisma
Copy link
Copy Markdown
Collaborator

@dewabisma dewabisma commented May 22, 2026

Summary

  • Handle payment intent that aware of different decimal separator
  • Prevent stacking on top same screen when processing intent

Note

Medium Risk
Changes how payment URL amounts are carried and parsed (wire amount vs localized/display text) and updates POS QR watch/matching logic to rely on raw BigInt values, which could impact payment flows if parsing/formatting expectations differ across locales.

Overview
POS mode now passes and validates raw planck amounts end-to-end. PosQrScreen takes amountPlanck: BigInt (instead of a formatted string), uses it directly for QR request generation and transfer matching, and shows an explicit error for invalid/zero amounts.

Payment-intent amount localization via AmountInputLogic was removed. parsePaymentUrlAmount/PaymentUrlAmountResult (and related unit tests) were deleted, PaymentIntent no longer exposes an amountPlanck helper, and the send flow now parses initialAmount differently for pay mode (parseWireAmount) vs normal send (parseQuanAmount). In pay mode, fiat flipping and the secondary "≈" display are disabled, and QR-scanned payment intents now populate the amount field with the raw URL amount string.

Reviewed by Cursor Bugbot for commit be858c9. Bugbot is set up for automated code reviews on this repo. Configure here.

@dewabisma dewabisma requested a review from n13 May 22, 2026 05:46
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 19792c2. Configure here.

Comment thread mobile-app/lib/v2/screens/send/input_amount_screen.dart Outdated
Comment thread mobile-app/lib/features/components/shared_address_action_sheet.dart
@dewabisma dewabisma merged commit 60e2b18 into main May 22, 2026
3 checks passed
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.

2 participants