Skip to content

Commit 4455e5a

Browse files
committed
frontend: consistently format btc amount in balance and summary
In the transaction overview, the amounts are displayed with a space: 0.00 000 000, in the account balance without 0.00000000. With a space, the amount is much easier to read consistent with other amounts in the app.
1 parent 040bc84 commit 4455e5a

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Changelog
22

33
## Unreleased
4+
- Format BTC/sat spaces consitently in account summary and total balance
45

56
## v4.48.0
67
- Removed the BTC/sat switch from the general settings in favor of a rotating unit in the account balance.

frontends/web/src/components/balance/balance.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,11 @@ export const Balance = ({
4646
amount={balance.available}
4747
tableRow
4848
enableRotateUnit={!noRotateFiat}
49-
removeBtcTrailingZeroes
5049
/>
5150
<AmountWithUnit
5251
amount={balance.available}
5352
tableRow
5453
enableRotateUnit={!noRotateFiat}
55-
removeBtcTrailingZeroes
5654
convertToFiat
5755
/>
5856
</tbody>
@@ -66,11 +64,14 @@ export const Balance = ({
6664
+<Amount
6765
amount={balance.incoming.amount}
6866
unit={balance.incoming.unit}
69-
removeBtcTrailingZeroes/>
67+
/>
7068
{' '}{balance.incoming.unit} /
7169
<span className={style.incomingConversion}>
7270
{' '}
73-
<AmountWithUnit amount={balance.incoming} removeBtcTrailingZeroes convertToFiat/>
71+
<AmountWithUnit
72+
amount={balance.incoming}
73+
convertToFiat
74+
/>
7475
</span>
7576
</span>
7677
</p>

frontends/web/src/routes/account/summary/chart.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,6 @@ export const Chart = ({
581581
<Amount
582582
amount={!showMobileTotalValue ? formattedChartTotal : toolTipValue}
583583
unit={chartFiat}
584-
removeBtcTrailingZeroes
585584
onMobileClick={rotateDefaultCurrency}
586585
/>
587586
) : (

frontends/web/src/routes/bitsurance/dashboard.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,6 @@ export const BitsuranceDashboard = ({ accounts }: TProps) => {
168168
<Amount
169169
amount={balances[account.code].available.amount}
170170
unit={balances[account.code].available.unit}
171-
removeBtcTrailingZeroes
172171
/>
173172
{` ${balances[account.code].available.unit}`}
174173
</>

0 commit comments

Comments
 (0)