fix(wallet): nav, back button, transfer amount, fees, account selection - #61
Merged
Merged
Conversation
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>
…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.
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
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
goBackOrFallback) instead of a hardcoded route.rail-fee-config.ts's intended/target formulas, not tied to any live quote.parseFloat, sending 200 minor units instead of 200,000 and trippingToken::BelowMinimumon-chain).accounts[0]— with only one eligible account it still renders, pre-selected.Changes
src/components/bottom-nav.tsx,src/lib/navigation.tsusage inaccounts/index.tsxandaccounts/$urn.tsxsrc/routes/_authed/topup/index.tsx,src/routes/_authed/send/index.tsx— grouping + fee labels + account pickersrc/routes/_authed/send/colombian-banks/index.tsx,src/routes/_authed/send/us-banks/index.tsx— account picker, balance filter fixsrc/routes/_authed/breb-keys/pay-transfer/index.tsx— always show existing account picker (was 2+ only)src/routes/_authed/accounts/$urn.tsx— transfer amount sanitizationsrc/components/account/account-carousel.tsx— currency-correct formatting (formatCOP/formatUSD) instead of rawtoFixedsrc/index.tsx— default themesrc/i18n/locales/{es,en}.jsonRisk
🤖 Generated with Claude Code