Repository navigation
fix(payments): show insufficient funds above the swipe sheets - #1873
Merged
Merged
Conversation
Request pay, group send and Currency Info send drew their swipe sheet in a Material ModalBottomSheet, a window of its own, so the insufficient-funds modal (drawn in the Activity window) appeared behind it. Draw the sheets in the route's own window instead, through a new InWindowBottomSheet, so the bar the entry decorator draws lands above them. The sheet content moves to one stateless SwipePaySheet fed by a SwipePayUiState and SwipePayActions. Request pay and Currency Info send also check the balance before the sheet opens, and Add Money closes the sheet before opening the deposit screen.
bmc08gt
force-pushed
the
fix/insufficient-funds-over-sheet
branch
from
October 28, 2026 18:55
4053c54 to
78a554e
Compare
The payer picks the token in the sheet, so the check runs after the swipe against that pick. CodeButton latches its size from the label only, so a button first composed while loading no longer clips its text.
…details Extract the pay logic into RequestPayFlow, shared by Request details and a new chat-side RequestPayViewModel. The deck's Pay now opens the swipe sheet in the chat screen; the card body still opens details. Drops the pay flag on ChatStep.RequestDetails and payOnOpen.
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.
The swipe sheets for request pay, group send and Currency Info send were Material3
ModalBottomSheets. Each opens its own window, so aBottomBarManagermodal raised while one was up, such as insufficient funds, drew underneath it in the Activity window.The three sheets are now
SwipePaySheet, built on a newInWindowBottomSheet(ui/navigation, on top ofUnstyledBottomSheet) and drawn inside the route's content. The entry decorator draws the bar afterentry.Content()in the same window, so errors now show over the sheet and the sheet stays open under them.InWindowBottomSheetkeeps the scrim, back handling, the lock while a swipe is in progress, and the same 92.5% height cap as the nav sheets.pay = trueand open the sheet on top. The pay logic moved out ofRequestDetailsViewModelintoRequestPayFlow, which both the chat (RequestPayViewModel) and Request details use.payandpayOnOpenare gone. Tapping the card itself still opens Request details.CodeButtonlatched its size on first composition, so a button first drawn while loading kept the spinner's width and clipped its label to one letter once loading ended (request details' "Send $2" opened through deck Pay). It now latches only while the label is shown.SwipePaySheetis stateless: it takes aSwipePayUiStateandSwipePayActions.docs/swipe-sheet-destinations.mdlays out the next step: each sheet as its own nav destination with an entry-scoped view model, including thehostsBarschange a partial sheet needs and the nestedFlowHostgroup send sits in.RequestPayFlowTest,RequestDetailsInsufficientFundsTestandCurrencySendInsufficientFundsTestcover the sheet opening without a pre-check, the sheet staying open after a post-swipe failure, and the closed and nothing-to-pay outcomes.