Commit 2f34a84
committed
fix(frontend): correct formatTokenAmount in IncomingStreams to use Intl.NumberFormat
The value passed to formatTokenAmount is already a human-scaled token amount
(stroops divided by 1e7 in the dashboard mapper). The previous implementation
incorrectly passed it through formatAmount(BigInt(Math.floor(value)), 7),
re-interpreting it as raw base units and dividing by 1e7 a second time.
This caused the Deposited, Withdrawn, and Claimable columns to display wildly
wrong (tiny) values — e.g. 10.5 XLM was rendered as 0.0000010.
Fix: format the human number directly via Intl.NumberFormat with up to 7
fraction digits, consistent with IncomingStreamCard. Remove the now-unused
formatAmount import.
Closes #5751 parent 215b769 commit 2f34a84
1 file changed
Lines changed: 14 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
16 | 24 | | |
17 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
18 | 29 | | |
19 | 30 | | |
20 | 31 | | |
| |||
0 commit comments