Skip to content

fix(payments): step-back nav and mismatched flow copy in US-bank steps - #59

Merged
MakelangelOO merged 3 commits into
developfrom
fix/bqe-2653-rtp-us-banks
Sep 9, 2026
Merged

MakelangelOO merged 3 commits into
developfrom
fix/bqe-2653-rtp-us-banks

Conversation

@MakelangelOO

@MakelangelOO MakelangelOO commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

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 by topup/us-banks and send/us-banks) had no back button at all — the only step in either stepper you couldn't leave without abandoning the whole flow.
  • Both US-bank flows showed a generic "no destination/source account" error even when the actual cause was a rejected KYC — now checked against user.kycStatus and given a clear message.
  • TopUpConfirmStep and TopUpAmountStep are, today, used exclusively by send/colombian-banks (never by topup), 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.
  • Investigating a real user stuck with "no destination account available" (approved KYC, bank linked via Plaid, but zero pocket accounts) turned up that the wallet's pocket-creation call never passed ledgerId, even though the SDK supports attaching a new pocket to an existing ledger account (instant active, no new ledger minted) — the same mechanism card/polygon creation 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.
  • Once fixed, it also became clear 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: optional onBack prop + back button.
  • topup/us-banks/index.tsx, send/us-banks/index.tsx: wire onBack, add kycRejectedError copy path.
  • topup/-components/amount-step.tsx: feeLabel/disclaimer/arrivalLabel are 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/createVirtualAccount now pass ledgerId through to the SDK.
  • accounts/$urn.tsx: "add product" now offers a pocket/"Cuenta" option alongside card/breb/polygon, anchored to account.ledgerId the 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: new kycRejectedError keys, generic confirmStep.summary, new send.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 --noEmit and biome check.

Linear: BQE-2653

🤖 Generated with Claude Code

…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>
@linear

linear Bot commented Sep 9, 2026

Copy link
Copy Markdown

BQE-2653

MakelangelOO and others added 2 commits September 9, 2026 17:42
…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
MakelangelOO merged commit 626e8d2 into develop Sep 9, 2026
2 checks passed
@MakelangelOO
MakelangelOO deleted the fix/bqe-2653-rtp-us-banks branch September 9, 2026 23:08
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>
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.

1 participant