01a0a46b - Disclose whole-REALU rounding on OpenCryptoPay pay - #987
Open
TaprootFreakAI wants to merge 13 commits into
Open
TaprootFreakAI wants to merge 13 commits into
TaprootFreakAI wants to merge 13 commits into
Conversation
Every payment rounds up to whole REALU shares because there are no fractional shares. The intro and confirm screens state that leftover ZCHF stays in the wallet. Invalid swap quotes no longer look payable, and Pay re-enables after the process route pops. Handbook spec-81 documents the confirm-screen notice (slots 291-293).
The confirm-screen regression test now pops the debug-wallet failure sheet and process route the same way production Close does, so Pay is asserted enabled after return.
Invalid swap quotes emit a typed PayQuoteError.insufficientHoldings state. The view maps that to the existing insufficient-holdings string via S.of(context), matching CONTRIBUTING localization rules.
After rebasing onto staging, bind-error overlays occupy 291-292. The pay rounding cards keep 293-295 in both mapping and visible permalinks.
TaprootFreakAI
force-pushed
the
feature/01a0a46b-pay-whole-realu-round-up
branch
from
September 15, 2026 11:17
79737c3 to
0dcbaa8
Compare
The cubit emits typed errors; copy lives in the view. Document pay handbook slots 293-295 on PayInfoPage and PayQuotePage.
PayProcess now returns whether the swap ran. Success or retry-close pops the quote page so Pay cannot sell REALU twice. A pre-swap failure still returns to the quote with Pay enabled.
Pay re-enables only when the process route pops false (pre-swap failure). A completed swap, retry-close, or AppBar/system back leaves the quote so REALU cannot be sold twice. Failure sheets now read the cubit swapCompleted flag.
A timeout or dropped 2xx can still have sent the REALU sale. Marking swapCompleted before broadcastSwapTransaction keeps Pay from running twice if the HTTP call then fails.
AmountTooLow is the API volume signal. Mapping it onto insufficient holdings re-interpreted a backend string. Invalid quotes stay unpayable.
Once swapCompleted is set, a broadcast timeout is recovery, not a re-scan. The retry sheet can close the quote without offering Pay again.
Invalid swaps already surface the API error 1:1. The named constructor and view branch had no production caller.
The process cubit used to map every !isValid quote to insufficientZchf. The API error string is now the failure message; Pay still does not run.
Collaborator
Author
|
EN: DE: DetailsHead Review:
Local check: Flutter 3.41.6 Docker — pay quote/process cubit and page tests. |
TaprootFreakAI
marked this pull request as ready for review
September 15, 2026 16:49
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
EN:
The OpenCryptoPay intro and confirm screens now tell the user that every payment is rounded up to whole REALU shares, because there are no fractional shares, and leftover ZCHF stays in the wallet.
Invalid swap quotes no longer look payable, Pay re-enables after the process route pops, and handbook spec-81 documents the notice (slots 291–293).
DE:
Die OpenCryptoPay-Intro- und Bestätigungsseite sagen jetzt, dass jede Zahlung auf ganze REALU-Anteile aufgerundet wird, weil es keine halben Anteile gibt, und dass Rest-ZCHF in der Wallet bleibt.
Ungültige Swap-Quotes wirken nicht mehr zahlbar, Bezahlen wird nach dem Prozess-Route wieder aktiv, Handbook spec-81 dokumentiert den Hinweis (Slots 291–293).
Details
The confirm screen previously rendered a 0-REALU quote as Ready and left Pay disabled after a failed process step. Copy also never stated the whole-share rule.
This change:
payInfoBodyand adds always-visiblepayQuoteRoundingNoticeon the confirm screen.PayQuoteErrorwhenswap.isValidis false (AmountTooLow→ existing insufficient-holdings copy).Navigator.pushand clears_navigatingso Pay works again after pop.Golden PNGs are not regenerated in this commit. After merge-ready review, dispatch
golden-regenerate.yamlon this branch so Visual Regression picks up the new notice.The payment API remains the authority on the integer share count; the app only displays and explains it.