Repository navigation
UI: withdrawal crypto flow - #67
Merged
Merged
Conversation
The designs cap a top-up at $5,000 ("Maximum 5,000 $CASH" on the Add
funds frame) but a withdrawal at $2,000, so withdrawalSelectorConfig
overrides only the maximum while provider, routes and minimum stay
shared.
groupAmountDigits writes the thousands-separated form every screen
shows, leaving the keypad ungrouped string as typed.
The top-up amount screen carried everything inline; the pieces any amount screen needs now stand alone: the route pills, the fitted amount display, the keypad (owning its disabled look), the tappable purse pill, and FundingAmountShell — the frame of header, pills, scrolling column, error band, keypad wiring and bottom-anchored CTA, with the screen's own middle band coming in through a slot. The shell guards the continue emit itself, so the gate never rests on the button's disabled attribute alone. The display and the pill speak CashAmount: the symbol and the small-caps ticker come from the one treatment, so neither takes a spelling prop, and the caret rides CashAmount's slot between the number and the ticker. useAmountFit measures the one span the treatment leaves — symbol, ticker and caret all ride the scale. The route-availability rule moves next to the other selection rules as isFundingRouteAvailable, read by every component instead of each keeping its own. The shell screen takes an amount-screen component so another flow can draw the same contract to its own frames.
WithdrawAmountScreen draws the shared shell to the withdrawal frames: the amount in CashAmount's treatment, the purse pill offering the balance as an amount the keypad can take, and the line underneath naming whichever bound the amount broke. assessWithdrawalAmount reads that line and the CTA gate from one reading. The configured bounds come through fundingAmountStatus — the same reading the shell's createFundingSelection takes — so the gate and the shell can never drift on what the bounds mean; the function keeps only what is its own: the empty/zero hint (which the shared pipeline would file as a breach), the purse bound the shell does not know, and the wording. The bounds report in the frames' order — the configured maximum before the purse — and the gate fails closed while the purse is unknown, open only where there is provably none.
usePurseBalance speaks in named states — unknown, none, known — so loading and no-purse can never swap at the seam; the page maps each state to its prop reading by name (unknown holds the pill's skeleton and the gate closed, none shows no pill, only a known balance is offered). A failed read retries on its own, 2s/5s/15s and then a 30s walk, and once the quick ladder is spent the screen says so — "Your balance couldn't be read. Retrying…" in the band the route errors take — healing itself when a read lands. The page re-reads the purse whenever the user returns from a package or a watched withdrawal, so the pill never offers what a completed withdrawal already took, and the purse's read state carries into the launch skeleton so the column holds its shape while loading.
The notice line travels as the pieces CashAmount draws — lead, range opener, figure — so the shell writes both screens' lines in the one treatment, and the purse crosses as the base units usePurseBalance read, truncated to the keypad's scale only at the gate and the pill.
piggydoughnut
marked this pull request as draft
September 25, 2026 06:28
|
pr67-getcash.paseo · logs |
piggydoughnut
force-pushed
the
ui/withdrawal-crypto
branch
from
September 25, 2026 08:41
ef74f48 to
d41463d
Compare
piggydoughnut
marked this pull request as ready for review
September 25, 2026 08:41
minato-32
reviewed
Oct 12, 2026
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.
What this changes
How it was tested
Screenshots / recording (if any)
Checklist
pnpm typecheckandpnpm typecheck:packagespasspnpm testpassespnpm format:checkpasses (runpnpm formatto fix)pnpm buildsucceeds (andpnpm build:workerif the worker changed)Co-Authored-By:trailers in commits (they fail the paritytech CLA check)Related