fix: the balance lists and Home cut amounts to four decimals (closes #757)
The balance lists and Home's ETH line rounded with toFixed(4), so 0.99996 ETH read 1.0000 there and 0.9999 on Send. They now cut the stored decimal string with truncateAmount(), as the history rows do. balanceLine() takes the stored balance string instead of a parsed number, and escapes the quantity cell. The screens that state what is authorized keep the floor of truncateAmountNeverZero(). Model: opus-5-5
This commit is contained in:
1 parent
6d158bf1b1
commit
fb7c75101f
12 files changed
+146
-54
No files matched your search
@@ -4,8 +4,8 @@
|
||||
// the copy is the substance and is tested as such. Two things it must not
|
||||
// get wrong: what it takes to get the address back — the app refuses both
|
||||
// obvious routes — and what counts as holding something, which is any
|
||||
// ERC-20 as well as ETH, at any size, including a balance that rounds to
|
||||
// zero at the four decimals the balance lines render. The DOM behaviour
|
||||
// ERC-20 as well as ETH, at any size, including a balance below the four
|
||||
// decimals the balance lines render. The DOM behaviour
|
||||
// around them is driven against the real popup by tests/e2e/run.js.
|
||||
|
||||
// helpers.js pulls in state.js, which reads chrome.storage.local at load.
|
||||
|
||||
Reference in new issue
Block a user