Skip to content

fix(wallet): nav, back button, transfer amount, fees, account selection - #61

Merged
MakelangelOO merged 13 commits into
developfrom
fix/nav-fees-copy
Sep 14, 2026
Merged

MakelangelOO merged 13 commits into
developfrom
fix/nav-fees-copy

Conversation

@MakelangelOO

Copy link
Copy Markdown
Collaborator

Why

Bundles a batch of wallet UX/correctness issues reported this cycle (BQE-2660, 2662, 2664, 2665, 2666, 2659, 2663), plus fixes found during a self-review pass.

How it works

  • Bottom nav "Movimientos" is now the fixed second tab (was conditional on account count); "Cuentas" stays reachable from Home/Profile.
  • Back on account detail/list now pops real browser history (goBackOrFallback) instead of a hardcoded route.
  • Recarga/envío rail options are grouped by country (Colombia / Estados Unidos), with the redundant country name dropped from individual titles.
  • Each rail option shows its real-world cost (provider + Bloque's own cut, partner share excluded) — purely informational, computed from rail-fee-config.ts's intended/target formulas, not tied to any live quote.
  • Own-account transfer amount input now sanitizes to digits-only for COP assets (root cause of a real failed transfer: a Colombian-style "2.000" thousands separator was being parsed as 2 by parseFloat, sending 200 minor units instead of 200,000 and tripping Token::BelowMinimum on-chain).
  • Recarga PSE (destination), envío bancos CO/US (source), and BRE-B payout (source) now show an account picker instead of silently defaulting to accounts[0] — with only one eligible account it still renders, pre-selected.
  • Default theme is now light instead of dark.
  • Copy: removes "Wire" from the ACH label, names RTP explicitly on the US send option.

Changes

  • src/components/bottom-nav.tsx, src/lib/navigation.ts usage in accounts/index.tsx and accounts/$urn.tsx
  • src/routes/_authed/topup/index.tsx, src/routes/_authed/send/index.tsx — grouping + fee labels + account picker
  • src/routes/_authed/send/colombian-banks/index.tsx, src/routes/_authed/send/us-banks/index.tsx — account picker, balance filter fix
  • src/routes/_authed/breb-keys/pay-transfer/index.tsx — always show existing account picker (was 2+ only)
  • src/routes/_authed/accounts/$urn.tsx — transfer amount sanitization
  • src/components/account/account-carousel.tsx — currency-correct formatting (formatCOP/formatUSD) instead of raw toFixed
  • src/index.tsx — default theme
  • src/i18n/locales/{es,en}.json

Risk

  • Money-moving logic touched in two places: the transfer amount sanitizer (BQE-2663) and which account gets used as source/destination (BQE-2659). Verified against real production data (ledger/swap DB) for the root-cause bugs; a fresh, context-blind agent review was run against the full diff and its findings were fixed or addressed inline.
  • Fee labels are informational only — verified they do not feed into any submitted order amount (own separate finding/fix, see BQE-2664 history).
  • Nav/theme/copy/grouping changes are UI-only, low risk, easy to verify visually.

🤖 Generated with Claude Code

MakelangelOO and others added 12 commits September 10, 2026 20:01
Nav bar showed "Cuentas" instead of "Movimientos" for users with
more than one account. Movimientos is now the fixed second tab;
Cuentas stays reachable from Home > Ver todo.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Back on account detail and accounts list was hardcoded to /accounts
and /profile, ignoring where the user actually came from. Uses
goBackOrFallback (existing helper) to pop real browser history first.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Recharge's US banks option said "ACH / Wire" though only ACH is
supported. Send's US banks option now names RTP explicitly.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Colombia and US rails now render under their own section header
instead of a flat list; per-option titles/descriptions drop the
redundant country name now that it's implicit in the group.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Each recarga/envio rail now shows its combined real cost (provider +
Bloque, partner share excluded) next to its title. Numbers verified
directly against payment-rails' rail-fee-config.ts, including the
Cobre spread the file's own provider_cost field deliberately omits.

Also fixes send/colombian-banks always quoting $0 fee in the amount
step's "total a debitar" — was hardcoded, now reflects the real
5,500 COP flat component (Cobre 3,500 + Bloque 2,000).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Cobre's 0.2% dispersion spread is a payout-only real cost (per the
provider cost table), not charged on deposits. Recarga is 500 COP +
0.2% (Bloque only); envio stays 500 COP + 0.4% (adds Cobre's spread).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The field was the only amount input in the app that didn't strip
non-digit characters. A COP amount typed with a thousands-separator
dot (e.g. "2.000" for 2000) got silently truncated by parseFloat to
2, sending 200 minor units on-chain instead of 200,000 — which then
tripped Token::BelowMinimum. Confirmed against the real failed tx in
ledger.settlement_tx (input.amount: "200", asset COPM/2).

COP now sanitizes to digits-only, matching every other COP input in
the app; USD/KSM keep decimal entry (single dot, 2 places).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Recarga PSE (destination), envio a bancos colombianos (source), envio
a bancos/RTP EEUU (source), and BRE-B payout (source, extending the
existing selector) now show an account carousel in the amount step
instead of silently defaulting to accounts[0]. With only one eligible
account it still renders, already selected — with 2+, it's the picker.

BRE-B deposit is unchanged: still no selector, money always lands on
the account tied to the registered key.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The fee-per-rail feature is purely informational (what a rail costs
today) — it was never meant to change any real calculation. Revert
the additive "Total a debitar" in send/colombian-banks; the true
amount debited is always exactly what the user types, per the
kusama-bank graph template.

Also: colombian-banks' source-account picker now filters by positive
COPM balance (matches its sibling flows, us-banks and BRE-B payout —
was the one picker letting you select a $0 account). AccountCarousel
now formats balances with formatCOP/formatUSD instead of raw
toFixed(2). Fixed missing accent in "vía RTP".

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Money in a fee label now always renders in its own currency's format
(COP thousands separator + peso sign, USD decimals + dollar sign),
regardless of the app's interface language — same fix as
AccountCarousel. Numbers themselves are unchanged: they reflect the
intended/target formula per rail-fee-config.ts, not whatever a given
corridor's live rate quote happens to produce today.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Component test still expected the pre-formatCOP raw balance string
("1500.50 COP") — account-carousel.tsx now renders proper currency
formatting, so the assertion needed the real Intl output ("$ 1.501").

E2E accounts spec still asserted the old "Cuentas" nav label, which
this branch intentionally replaced with "Movimientos" (BQE-2660).

Verified locally: full unit (121), component (7), and e2e (11) suites
all green.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@linear

linear Bot commented Sep 11, 2026

Copy link
Copy Markdown

…t precision

send/colombian-banks showed "Comisión: \$0" in the amount step right
after the rail list quoted a real fee one screen earlier — contradictory
now that the amount step's fee prop is correctly 0 (the real debit,
per the swap graph). Hide that row entirely when fee is 0 instead of
displaying a number that isn't the real cost.

Own-account transfer amount input was capping non-COP decimals to a
hardcoded 2 places regardless of the asset's real precision (DUSD/6
truncated to cents). Now uses the asset's actual precision.
@MakelangelOO
MakelangelOO merged commit f9871c3 into develop Sep 14, 2026
2 checks passed
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