Skip to content

feat(wallet): prefix fiat amounts with currency symbols - #535

Merged
bordalix merged 2 commits into
masterfrom
wt-fiat-symbol-prefix-20260415
Apr 16, 2026
Merged

bordalix merged 2 commits into
masterfrom
wt-fiat-symbol-prefix-20260415

Conversation

@sahilc0

@sahilc0 sahilc0 commented Apr 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fiat amounts previously rendered with a trailing ISO code (100.00 USD, 50.00 EUR). They now use the common Unicode currency symbol as a prefix — $100.00, €50.00, £25.00, ¥1,000. Currencies without a widely-used single-char symbol (CHF, CNY) keep the trailing-code form, so CNY does not collide with JPY's ¥.

What changed

New helpers in src/lib/format.ts

  • prettyFiatAmount(amount, currency) and prettyFiatHide(value, currency) — take the Fiats enum as a typed parameter so only real fiat flows through.
  • Decimals are derived from the currency via fiatDecimalsFor in src/lib/fiat.ts (JPY = 0, else 2) — shared between FiatContext and prettyFiatAmount, so call sites no longer need to pass fiatDecimals().
  • The generic prettyAmount / prettyHide are intentionally left untouched so asset tickers (e.g. a stablecoin named USD) that flow through those helpers keep their trailing-code format.

Affected displays

  • Hero balance (Balance.tsx)
  • Transaction list fiat line (TransactionsList.tsx)
  • Amount picker keyboard (Keyboard.tsx)
  • Transaction details screen (Details.tsx)
  • Send / Receive / Notes success confirmations
  • Send form "available" caption (Send/Form.tsx)
  • Send/Receive amount input labels (InputAmount.tsx) — left label shows $ instead of USD, right-side fiat conversion is also prefixed

Pre-existing bug fixed along the way

Details.tsx was calling prettyAmount without passing fiatDecimals(), hardcoding 2 decimals. JPY now correctly renders as ¥174 / ¥0 in the transaction details instead of 174.00 JPY / 0.00 JPY.

Hero eye-toggle alignment

The eye button wrapper omits an empty unit <Text> when the symbol is inlined into the balance, and stays inside an alignItems: center flex container next to the unit text — keeping the icon centered with the smaller ISO code in the CHF case (5.70 CHF 👁) and snug against the balance in the symbol case ($7.30 👁).

Settings screens are intentionally unchanged

Settings/General.tsx and the Settings/Fiat.tsx picker continue to display the ISO code as an identifier — those render a setting value, not an amount.

Visual verification

Dev server run against all six supported fiats:

Currency Hero Transactions list Transaction details Send input
USD $7.30 $0.75, $11.28 $1.09 / $0.75 $ label, $7.07 available
EUR €6.20 €0.64, €9.59 €0.93 € label
GBP covered via unit tests — — —
JPY ¥1,163 (0 decimals) ¥119, ¥1,798 ¥174, ¥0, ¥174 (Details fix) ¥ label, ¥1,123 available
CHF 5.70 CHF (trailing) 0.59 CHF, 8.84 CHF 0.85 CHF CHF label
CNY covered via unit tests — — —

Sats-only paths were spot-checked to confirm no regressions (delegate fees, VTXOs screen, Boltz swap list, asset rows with custom tickers).

Test plan

  • bun run test:unit — new coverage for prettyFiatAmount / prettyFiatHide passes; existing prettyAmount / prettyHide tests untouched. Two pre-existing failures in receive-qrcode.test.tsx are unrelated and reproduce on master.
  • Component test src/test/screens/wallet/index.test.tsx updated to assert the new $0.00 rendering.
  • E2E assertions in src/test/e2e/init.test.ts and src/test/e2e/keyboard.test.ts updated to match the symbol-prefix format.
  • Full Playwright E2E run in CI.
  • Manual sweep across USD, EUR, JPY, CHF on both Fiat only and Show both display modes, with showBalance toggled.

Summary by CodeRabbit

  • New Features

    • Fiat amounts now show currency symbols when available and suppress redundant fiat unit labels; JPY uses 0 decimals, others use 2.
    • Improved masked/hidden balance rendering to respect presence/absence of currency symbols.
  • Bug Fixes

    • Consistent fiat formatting applied across screens and input/keyboard flows.
  • Tests

    • Updated UI and formatting tests to expect symbol-based fiat displays.

Amounts previously rendered with a trailing ISO code (`100.00 USD`, `50.00 EUR`)
now use the common Unicode currency symbol as a prefix: `$100.00`, `€50.00`,
`£25.00`, `¥1,000`. Currencies without a widely-used single-char symbol (CHF,
CNY) keep the trailing-code form, so CNY does not collide with JPY's `¥`.

The new formatters live alongside the existing generic ones:
- `prettyFiatAmount(amount, currency)` and `prettyFiatHide(value, currency)` in
  `src/lib/format.ts` take the `Fiats` enum as a typed parameter.
- The generic `prettyAmount` / `prettyHide` are intentionally left untouched so
  asset tickers (e.g. a stablecoin named `USD`) that flow through those helpers
  keep their trailing-code format.
- Decimals are derived from the currency via `fiatDecimalsFor` in
  `src/lib/fiat.ts` (JPY = 0, others = 2) — shared between `FiatContext` and
  `prettyFiatAmount` so call sites no longer need to pass `fiatDecimals()`.

Touched displays: hero balance (`Balance.tsx`), transaction list rows
(`TransactionsList.tsx`), amount picker (`Keyboard.tsx`), transaction details
(`Details.tsx`), Send/Receive/Notes success screens, and Send form available
caption. Amount input labels (`InputAmount.tsx`) also use the symbol when
available.

Side fix: `Details.tsx` previously called `prettyAmount` without passing
`fiatDecimals()`, hardcoding 2 decimals. JPY now renders as `¥174` / `¥0` in the
transaction details instead of `174.00 JPY` / `0.00 JPY`.

Hero alignment: the eye-toggle button wrapper now omits an empty unit `<Text>`
when the symbol is inlined into the balance, and the button sits inside a
`alignItems: center` flex container next to the unit text — keeping the icon
centered with the smaller ISO code in the CHF case and snug against the balance
in the `$7.30` case.

Tests:
- New coverage for `prettyFiatAmount` and `prettyFiatHide` in
  `src/test/lib/format.test.ts` (symbol + trailing-code + JPY 0-decimals).
- Existing `prettyAmount` / `prettyHide` tests unchanged — the generic helpers
  still behave the same.
- UI assertions updated to match the new rendered text:
  `src/test/screens/wallet/index.test.tsx` → `$0.00`
  `src/test/e2e/init.test.ts` → `$0.00`
  `src/test/e2e/keyboard.test.ts` → symbol-prefix regex
@sahilc0
sahilc0 requested review from bordalix and pietro909 April 16, 2026 15:58
@coderabbitai

coderabbitai Bot commented Apr 16, 2026 •

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 18ce5b2b-2825-4580-8802-ccecabc53d80

📥 Commits

Reviewing files that changed from the base of the PR and between 9480b9a and 721e94d.

📒 Files selected for processing (4)
  • src/components/Balance.tsx
  • src/components/InputAmount.tsx
  • src/components/Keyboard.tsx
  • src/screens/Wallet/Send/Form.tsx
✅ Files skipped from review due to trivial changes (2)
  • src/components/InputAmount.tsx
  • src/components/Keyboard.tsx
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/screens/Wallet/Send/Form.tsx
  • src/components/Balance.tsx

Walkthrough

Centralizes fiat symbol/decimal logic and adds dedicated fiat formatting. Introduces FIAT_SYMBOLS and fiatDecimalsFor(), adds prettyFiatAmount() / prettyFiatHide(), and updates UI/screens/tests to use symbol-aware fiat formatting instead of passing decimals into prettyAmount().

Changes

Cohort / File(s) Summary
Fiat utilities & formatters
src/lib/fiat.ts, src/lib/format.ts, src/providers/fiat.tsx
Added FIAT_SYMBOLS and fiatDecimalsFor(). Implemented prettyFiatAmount() and prettyFiatHide(). Replaced inline fiat-decimals logic with fiatDecimalsFor() and exposed currency-aware formatting helpers.
Core UI components
src/components/Balance.tsx, src/components/Details.tsx, src/components/InputAmount.tsx, src/components/Keyboard.tsx, src/components/TransactionsList.tsx
Switched components to use new fiat helpers and symbol lookup. Adjusted unit/label selection so symbol is embedded in amounts and separate fiat unit label is suppressed when a symbol exists.
Screen-level changes
src/screens/Wallet/Notes/Success.tsx, src/screens/Wallet/Receive/Success.tsx, src/screens/Wallet/Send/Form.tsx, src/screens/Wallet/Send/Success.tsx
Replaced prettyAmount(..., config.fiat, fiatDecimals()) usages with prettyFiatAmount(...). Removed fiatDecimals from consumed FiatContext where applicable.
Tests & E2E updates
src/test/lib/format.test.ts, src/test/e2e/init.test.ts, src/test/e2e/keyboard.test.ts, src/test/screens/wallet/index.test.tsx
Added unit tests for prettyFiatAmount/prettyFiatHide. Updated e2e and UI tests to expect symbol-based fiat display (e.g., "$0.00" / € patterns) and adjusted assertions accordingly.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • pietro909
🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat(wallet): prefix fiat amounts with currency symbols' clearly and accurately summarizes the main change—refactoring fiat display to use currency symbols (e.g., $, €, £, ¥) instead of trailing ISO codes.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch wt-fiat-symbol-prefix-20260415

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Apr 16, 2026 •

Copy link
Copy Markdown

Deploying wallet-bitcoin with  Cloudflare Pages  Cloudflare Pages

Latest commit: 721e94d
Status: ✅  Deploy successful!
Preview URL: https://2ca7cc9d.wallet-bitcoin.pages.dev
Branch Preview URL: https://wt-fiat-symbol-prefix-202604.wallet-bitcoin.pages.dev

View logs

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Apr 16, 2026 •

Copy link
Copy Markdown

Deploying wallet-mutinynet with  Cloudflare Pages  Cloudflare Pages

Latest commit: 721e94d
Status: ✅  Deploy successful!
Preview URL: https://53f00574.arkade-wallet.pages.dev
Branch Preview URL: https://wt-fiat-symbol-prefix-202604.arkade-wallet.pages.dev

View logs

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Apr 16, 2026 •

Copy link
Copy Markdown

Deploying tmp-boltz-upstream-mainnet-arkade-wallet with  Cloudflare Pages  Cloudflare Pages

Latest commit: 721e94d
Status: ✅  Deploy successful!
Preview URL: https://7e5fa3e1.tmp-boltz-upstream-mainnet-arkade-wallet.pages.dev
Branch Preview URL: https://wt-fiat-symbol-prefix-202604.tmp-boltz-upstream-mainnet-arkade-wallet.pages.dev

View logs

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
src/components/Balance.tsx (1)

22-30: Consider using prettyFiatAmount/prettyFiatHide for consistency.

This component manually handles symbol prefixing with fiatBalanceRaw and the conditional fiatBalance construction, while other components in this PR (Details, TransactionsList, Send/Success, Send/Form) use prettyFiatAmount and prettyFiatHide which encapsulate this logic.

The current implementation is functionally correct, but the symbol-prefixing logic is duplicated. Consolidating to the centralized helpers would reduce maintenance burden.

♻️ Suggested refactor using centralized helpers
-import { prettyHide, prettyNumber } from '../lib/format'
-import { FIAT_SYMBOLS } from '../lib/fiat'
+import { prettyHide, prettyNumber, prettyFiatAmount, prettyFiatHide } from '../lib/format'
+import { FIAT_SYMBOLS, fiatDecimalsFor } from '../lib/fiat'

Then in the component body:

-  const { toFiat, fiatDecimals } = useContext(FiatContext)
+  const { toFiat } = useContext(FiatContext)

   const fiatAmount = toFiat(amount)
   const showFiat = config.currencyDisplay === CurrencyDisplay.Fiat
   const fiatSymbol = FIAT_SYMBOLS[config.fiat]

   const satsBalance = config.showBalance ? prettyNumber(amount) : prettyHide(amount, '')
-  const fiatBalanceRaw = config.showBalance
-    ? prettyNumber(fiatAmount, fiatDecimals(), true, fiatDecimals())
-    : prettyHide(fiatAmount, '')
-  // prettyHide returns '' for a zero balance; skip the symbol prefix to avoid a lone "$".
-  const fiatBalance = fiatSymbol && fiatBalanceRaw ? `${fiatSymbol}${fiatBalanceRaw}` : fiatBalanceRaw
+  const fiatBalance = config.showBalance
+    ? prettyFiatAmount(fiatAmount, config.fiat)
+    : prettyFiatHide(fiatAmount, config.fiat)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/components/Balance.tsx` around lines 22 - 30, The fiat formatting
duplicates symbol-prefixing logic; replace the manual construction using
FIAT_SYMBOLS, fiatSymbol, fiatBalanceRaw and fiatUnit with the centralized
helpers prettyFiatAmount and prettyFiatHide: when config.showBalance is true
call prettyFiatAmount(fiatAmount, config.fiat) (or the project’s signature that
accepts decimals) and when hidden call prettyFiatHide(fiatAmount, config.fiat),
then use those results directly for display instead of building
`${fiatSymbol}${fiatBalanceRaw}` or computing fiatUnit, and remove the
now-unused prettyHide/prettyNumber prefix logic in Balance (referencing
fiatAmount, fiatDecimals, prettyHide, prettyNumber).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@src/components/Balance.tsx`:
- Around line 22-30: The fiat formatting duplicates symbol-prefixing logic;
replace the manual construction using FIAT_SYMBOLS, fiatSymbol, fiatBalanceRaw
and fiatUnit with the centralized helpers prettyFiatAmount and prettyFiatHide:
when config.showBalance is true call prettyFiatAmount(fiatAmount, config.fiat)
(or the project’s signature that accepts decimals) and when hidden call
prettyFiatHide(fiatAmount, config.fiat), then use those results directly for
display instead of building `${fiatSymbol}${fiatBalanceRaw}` or computing
fiatUnit, and remove the now-unused prettyHide/prettyNumber prefix logic in
Balance (referencing fiatAmount, fiatDecimals, prettyHide, prettyNumber).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: e32813be-01be-40cd-994d-bece6e9257a9

📥 Commits

Reviewing files that changed from the base of the PR and between 9ed4863 and 9480b9a.

📒 Files selected for processing (16)
  • src/components/Balance.tsx
  • src/components/Details.tsx
  • src/components/InputAmount.tsx
  • src/components/Keyboard.tsx
  • src/components/TransactionsList.tsx
  • src/lib/fiat.ts
  • src/lib/format.ts
  • src/providers/fiat.tsx
  • src/screens/Wallet/Notes/Success.tsx
  • src/screens/Wallet/Receive/Success.tsx
  • src/screens/Wallet/Send/Form.tsx
  • src/screens/Wallet/Send/Success.tsx
  • src/test/e2e/init.test.ts
  • src/test/e2e/keyboard.test.ts
  • src/test/lib/format.test.ts
  • src/test/screens/wallet/index.test.tsx

@sahilc0

sahilc0 commented Apr 16, 2026

Copy link
Copy Markdown
Contributor Author

@coderabbitai re: Balance.tsx nitpick — deliberately not using the helpers there. Balance renders mainBalance and mainUnit as separately-styled text elements: the balance in bigger heading medium and the unit in heading (smaller, baseline-aligned). prettyFiatAmount returns a combined string like "5.70 CHF", which would put "CHF" in the big-heading-medium style and lose the size differentiation. The manual fiatBalanceRaw → fiatBalance + fiatUnit split is what preserves that dual rendering.

The symbol-prefix logic here is only 1 line (fiatSymbol && fiatBalanceRaw ? \${fiatSymbol}${fiatBalanceRaw}` : fiatBalanceRaw`), and the comment above it explains the zero-hidden guard. Not worth consolidating if it forces a visual regression on the hero.

@coderabbitai

coderabbitai Bot commented Apr 16, 2026

Copy link
Copy Markdown
Contributor

Tip

For best results, initiate chat on the files or code changes.

@sahilc0 That makes complete sense — the separately-styled mainBalance / mainUnit elements are exactly the kind of split that prettyFiatAmount's combined string would collapse. The manual decomposition is the right call here to preserve the hero's visual hierarchy. Thanks for the context!


✏️ Learnings added
Learnt from: sahilc0
URL: https://github.com/arkade-os/wallet/pull/535

Timestamp: 2026-04-16T16:15:10.598Z
Learning: In `src/components/Balance.tsx` (arkade-os/wallet), the fiat balance and its unit are rendered as **separately-styled** text elements: the numeric balance uses a larger `bigger heading medium` style and the unit uses a smaller `heading` style. For this reason, `prettyFiatAmount` (which returns a single combined string like `"5.70 CHF"`) is deliberately NOT used here. Instead, the code manually splits into `fiatBalanceRaw` (the numeric part) and `fiatUnit` (the currency label), then prefixes the symbol inline (`fiatSymbol && fiatBalanceRaw ? \`\${fiatSymbol}\${fiatBalanceRaw}\` : fiatBalanceRaw`). Using the helper would merge both parts into the big-heading style and cause a visual regression on the hero balance display.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.


🧠 Learnings used
Learnt from: pietro909
Repo: arkade-os/wallet PR: 508
File: src/components/InputAmount.tsx:62-65
Timestamp: 2026-04-01T10:49:06.999Z
Learning: In arkade-os/wallet, the fiat/sats display toggle (`useFiat` from `ConfigContext`) is a setting changed only in the Settings tab (`Tabs.Settings`). Screens in the Wallet tab (e.g. Receive/Amount using `InputAmount`) are unmounted when the user switches to Settings (conditional `{tab === Tabs.Wallet && ...}` rendering in App.tsx) and remounted fresh on return. Therefore, `useFiat` cannot change while a Wallet-tab screen is mounted, and omitting `useFiat` from a `useEffect` dependency array in those screens is not a practical bug.

@bordalix
bordalix merged commit d81d96a into master Apr 16, 2026
6 checks passed
bordalix added a commit that referenced this pull request Apr 21, 2026
Amounts previously rendered with a trailing ISO code (`100.00 USD`, `50.00 EUR`)
now use the common Unicode currency symbol as a prefix: `$100.00`, `€50.00`,
`£25.00`, `¥1,000`. Currencies without a widely-used single-char symbol (CHF,
CNY) keep the trailing-code form, so CNY does not collide with JPY's `¥`.

The new formatters live alongside the existing generic ones:
- `prettyFiatAmount(amount, currency)` and `prettyFiatHide(value, currency)` in
  `src/lib/format.ts` take the `Fiats` enum as a typed parameter.
- The generic `prettyAmount` / `prettyHide` are intentionally left untouched so
  asset tickers (e.g. a stablecoin named `USD`) that flow through those helpers
  keep their trailing-code format.
- Decimals are derived from the currency via `fiatDecimalsFor` in
  `src/lib/fiat.ts` (JPY = 0, others = 2) — shared between `FiatContext` and
  `prettyFiatAmount` so call sites no longer need to pass `fiatDecimals()`.

Touched displays: hero balance (`Balance.tsx`), transaction list rows
(`TransactionsList.tsx`), amount picker (`Keyboard.tsx`), transaction details
(`Details.tsx`), Send/Receive/Notes success screens, and Send form available
caption. Amount input labels (`InputAmount.tsx`) also use the symbol when
available.

Side fix: `Details.tsx` previously called `prettyAmount` without passing
`fiatDecimals()`, hardcoding 2 decimals. JPY now renders as `¥174` / `¥0` in the
transaction details instead of `174.00 JPY` / `0.00 JPY`.

Hero alignment: the eye-toggle button wrapper now omits an empty unit `<Text>`
when the symbol is inlined into the balance, and the button sits inside a
`alignItems: center` flex container next to the unit text — keeping the icon
centered with the smaller ISO code in the CHF case and snug against the balance
in the `$7.30` case.

Tests:
- New coverage for `prettyFiatAmount` and `prettyFiatHide` in
  `src/test/lib/format.test.ts` (symbol + trailing-code + JPY 0-decimals).
- Existing `prettyAmount` / `prettyHide` tests unchanged — the generic helpers
  still behave the same.
- UI assertions updated to match the new rendered text:
  `src/test/screens/wallet/index.test.tsx` → `$0.00`
  `src/test/e2e/init.test.ts` → `$0.00`
  `src/test/e2e/keyboard.test.ts` → symbol-prefix regex

Co-authored-by: Sahil Chaturvedi <sahilc0@users.noreply.github.com>
Co-authored-by: João Bordalo <bordalix@users.noreply.github.com>
bordalix added a commit that referenced this pull request Apr 28, 2026
* remove ionic/normalize and ion-button

* rebbit fixes

* feat(wallet): prefix fiat amounts with currency symbols (#535)

Amounts previously rendered with a trailing ISO code (`100.00 USD`, `50.00 EUR`)
now use the common Unicode currency symbol as a prefix: `$100.00`, `€50.00`,
`£25.00`, `¥1,000`. Currencies without a widely-used single-char symbol (CHF,
CNY) keep the trailing-code form, so CNY does not collide with JPY's `¥`.

The new formatters live alongside the existing generic ones:
- `prettyFiatAmount(amount, currency)` and `prettyFiatHide(value, currency)` in
  `src/lib/format.ts` take the `Fiats` enum as a typed parameter.
- The generic `prettyAmount` / `prettyHide` are intentionally left untouched so
  asset tickers (e.g. a stablecoin named `USD`) that flow through those helpers
  keep their trailing-code format.
- Decimals are derived from the currency via `fiatDecimalsFor` in
  `src/lib/fiat.ts` (JPY = 0, others = 2) — shared between `FiatContext` and
  `prettyFiatAmount` so call sites no longer need to pass `fiatDecimals()`.

Touched displays: hero balance (`Balance.tsx`), transaction list rows
(`TransactionsList.tsx`), amount picker (`Keyboard.tsx`), transaction details
(`Details.tsx`), Send/Receive/Notes success screens, and Send form available
caption. Amount input labels (`InputAmount.tsx`) also use the symbol when
available.

Side fix: `Details.tsx` previously called `prettyAmount` without passing
`fiatDecimals()`, hardcoding 2 decimals. JPY now renders as `¥174` / `¥0` in the
transaction details instead of `174.00 JPY` / `0.00 JPY`.

Hero alignment: the eye-toggle button wrapper now omits an empty unit `<Text>`
when the symbol is inlined into the balance, and the button sits inside a
`alignItems: center` flex container next to the unit text — keeping the icon
centered with the smaller ISO code in the CHF case and snug against the balance
in the `$7.30` case.

Tests:
- New coverage for `prettyFiatAmount` and `prettyFiatHide` in
  `src/test/lib/format.test.ts` (symbol + trailing-code + JPY 0-decimals).
- Existing `prettyAmount` / `prettyHide` tests unchanged — the generic helpers
  still behave the same.
- UI assertions updated to match the new rendered text:
  `src/test/screens/wallet/index.test.tsx` → `$0.00`
  `src/test/e2e/init.test.ts` → `$0.00`
  `src/test/e2e/keyboard.test.ts` → symbol-prefix regex

Co-authored-by: Sahil Chaturvedi <sahilc0@users.noreply.github.com>
Co-authored-by: João Bordalo <bordalix@users.noreply.github.com>

* Upgrade ts-sdk 0.4.16 - boltz-swap 0.3.17 (#539)

* reverse logs in csv export (#546)

* reverse logs in csv export

* fix

* avoid mutating the React state array

* Extra tests (#548)

* close copy sheet after copy

* lint

* test swaps in receive

* Prevent swap after receival (#547)

* Prevent swap after receival

* fix

* more removals

* increase viewport size in tests

* more removals

* more removals

* fixes

* fixes

* fixes

* fix

* remove ion-refresher

* Merge branch 'master' into remove_ion-button

* fix swap page (#549)

* fix swap page

* lint

* add tests

* Upgrade ts-sdk 0.4.17 - boltz-swap 0.3.18 (#551)

* fix(receive): add spacing between button row and share button (#552)

The vertical gap between the Add amount/Copy buttons and the Share
button was too tight. Changed FlexCol gap from 0 to 0.75rem.

Co-authored-by: Sahil Chaturvedi <sahilc0@users.noreply.github.com>

* Revert "Upgrade ts-sdk 0.4.17 - boltz-swap 0.3.18 (#551)" (#553)

This reverts commit 1752cc8.

* Upgrade ts-sdk 0.4.17 - boltz-swap 0.3.18 (#551)

* Revert "Upgrade ts-sdk 0.4.17 - boltz-swap 0.3.18 (#551)" (#553)

This reverts commit 1752cc8.

* Upgrade ts-sdk 0.4.18 - boltz-swap 0.3.19 (#554)

* add git commit to chatwoot custom attributes (#563)

* add lnurl tests (#564)

* lint

* add lnurl tests

Co-authored-by: Copilot <copilot@github.com>

---------

Co-authored-by: Copilot <copilot@github.com>

* fix(ui): top-align tx history rows when assets are present (#537)

* fix(ui): top-align tx history rows when assets are present

When a transaction has assets, the right column (sats + fiat + asset
info) is taller than the left column (icon + label + date). The outer
FlexRow used alignItems 'center' by default, pushing the sats amount
above the label text. Switch to alignItems 'start' so both columns
begin at the same vertical position.

Also adds explicit 'between' to the outer FlexRow and removes a dead
alignItems on the non-flex wrapper div.

* show only 2 coins in the rigth side of a tx in txs list (#550)

---------

Co-authored-by: João Bordalo <bordalix@users.noreply.github.com>

* final removal

Co-authored-by: Copilot <copilot@github.com>

* Upgrade ts-sdk 0.4.19 - boltz-swap 0.3.20 (#565)

* lint

* fix box-sizing

Co-authored-by: Copilot <copilot@github.com>

* .label styles

Co-authored-by: Copilot <copilot@github.com>

* fix branta lint error (#568)

* works on refresher

Co-authored-by: Copilot <copilot@github.com>

* fix unit tests

Co-authored-by: Copilot <copilot@github.com>

* remove ionic/react

* fix label alignment

* DRY: AssetCard

Co-authored-by: Copilot <copilot@github.com>

* fix inputAmount

---------

Co-authored-by: Sahil Chaturvedi <sahilchaturvedi@protonmail.com>
Co-authored-by: Sahil Chaturvedi <sahilc0@users.noreply.github.com>
Co-authored-by: pietro909 <2094604+pietro909@users.noreply.github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>
@bordalix
bordalix deleted the wt-fiat-symbol-prefix-20260415 branch May 18, 2026 16:15
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.

2 participants