fix(payments): step-back nav and mismatched flow copy in US-bank steps - #59
Merged
Merged
Conversation
…nk steps - UsAmountStep had no back button, trapping users on that step - topup/send us-banks flows showed a generic account error even when the real cause was a rejected KYC - TopUpConfirmStep/TopUpAmountStep (used only by send/colombian-banks) leaked topup/PSE-specific copy (title, PSE disclaimer, PSE fee label) into the send flow Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…ng ledger - CreateVirtualAccountInput/createVirtualAccount now pass ledgerId through to the SDK, matching card/polygon — needed to attach a pocket to an account whose ledger already exists but has no pocket product yet (see BQE-2653: external-us-bank accounts stuck with no destination pocket) - account detail's "add product" now offers a pocket/"Cuenta" option alongside card/breb/polygon, wired the same way (ledgerId: account.ledgerId) - home quick actions (topup/send/BRE-B) are disabled with a toast hint when the user has no account yet, instead of failing deep inside each flow with a confusing "no destination account" error - the "+ new account" card is visually highlighted (primary border, underlined label) when the user has zero accounts Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
hasAccount and the carousel's highlight both read accounts.length off the query's data, which is [] before it resolves too — that flashed the quick actions as disabled (with the "create an account" toast) and highlighted the add-account card for users who do have one, on first login/cold cache. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
MakelangelOO
added a commit
that referenced
this pull request
Sep 9, 2026
#59) (#60) * fix(payments): step-back navigation and mismatched flow copy in US-bank steps - UsAmountStep had no back button, trapping users on that step - topup/send us-banks flows showed a generic account error even when the real cause was a rejected KYC - TopUpConfirmStep/TopUpAmountStep (used only by send/colombian-banks) leaked topup/PSE-specific copy (title, PSE disclaimer, PSE fee label) into the send flow * feat(accounts): allow creating a pocket account anchored to an existing ledger - CreateVirtualAccountInput/createVirtualAccount now pass ledgerId through to the SDK, matching card/polygon — needed to attach a pocket to an account whose ledger already exists but has no pocket product yet (see BQE-2653: external-us-bank accounts stuck with no destination pocket) - account detail's "add product" now offers a pocket/"Cuenta" option alongside card/breb/polygon, wired the same way (ledgerId: account.ledgerId) - home quick actions (topup/send/BRE-B) are disabled with a toast hint when the user has no account yet, instead of failing deep inside each flow with a confusing "no destination account" error - the "+ new account" card is visually highlighted (primary border, underlined label) when the user has zero accounts * fix(home): don't treat a still-loading accounts query as "no accounts" hasAccount and the carousel's highlight both read accounts.length off the query's data, which is [] before it resolves too — that flashed the quick actions as disabled (with the "create an account" toast) and highlighted the add-account card for users who do have one, on first login/cold cache. --------- Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
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.
Why
BQE-2653: Vane reported RTP/topup failures while testing with an external tester. Investigation (blosketools prod DB + mediums logs) found the real user-facing gaps in the wallet's US-bank steps, plus 2 more instances of the same bug class surfaced by an audit, plus a real backend/UX gap around missing pocket accounts.
How it works
UsAmountStep(shared bytopup/us-banksandsend/us-banks) had no back button at all — the only step in either stepper you couldn't leave without abandoning the whole flow.user.kycStatusand given a clear message.TopUpConfirmStepandTopUpAmountStepare, today, used exclusively bysend/colombian-banks(never bytopup), but still hardcoded topup/PSE-specific copy: a "Resumen de recarga"/"Top-up summary" heading and a PSE regulatory disclaimer + "Comisión PSE" fee label shown on what is actually a bank payout, not a PSE deposit.ledgerId, even though the SDK supports attaching a new pocket to an existing ledger account (instantactive, no new ledger minted) — the same mechanismcard/polygoncreation already use. Without it, there was no way from the wallet (or support, via the wallet) to fix this class of stuck account at all.topup/send/BRE-B fail deep inside their own flow with the same confusing error when a user has no account at all yet — better to disable them up front.Changes
topup/-components/us-amount-step.tsx: optionalonBackprop + back button.topup/us-banks/index.tsx,send/us-banks/index.tsx: wireonBack, addkycRejectedErrorcopy path.topup/-components/amount-step.tsx:feeLabel/disclaimer/arrivalLabelare now optional overridable props instead of hardcoded PSE text.send/colombian-banks/index.tsx: passes generic fee label, suppresses the PSE disclaimer/arrival estimate.domain/accounts/ports.ts,infra/bloque/accounts-repository.ts:CreateVirtualAccountInput/createVirtualAccountnow passledgerIdthrough to the SDK.accounts/$urn.tsx: "add product" now offers a pocket/"Cuenta" option alongside card/breb/polygon, anchored toaccount.ledgerIdthe same way card/polygon already are.(home)/-components/quick-actions.tsx,(home)/index.tsx: topup/send/BRE-B are disabled (with an explanatory toast) when the user has zero accounts.components/account/accounts-carousel.tsx: the "+ new account" card is visually highlighted (primary border, underlined label) when the user has zero accounts, to guide them there instead.es.json/en.json: newkycRejectedErrorkeys, genericconfirmStep.summary, newsend.colombianBanks.amountStep.feeLabel, new pocket-creation and quick-actions copy.Risk
Low — additive/optional props with defaults matching prior behavior; no change to order-creation logic or backend calls. Verified with
tsgo --noEmitandbiome check.Linear: BQE-2653
🤖 Generated with Claude Code