fix: show balances and fees below 0.000001 ETH as nonzero on the send screens (closes #343)
The stored ETH balance and the send-confirm screen's fee were each cut to six decimal places, so a value below 0.000001 read as 0.0, and the fee no longer matched the approval screen's. The ETH balance is now stored exactly, and the send screen's Current balance and the send-confirm screen's balance, fee, reserve and insufficient-balance messages go through truncateAmountNeverZero(), as the approval screen does. Token balances keep their six-decimal value: it is also what leaves dust off the balance list, and keeps the string within the 18 decimals the balance check reads. Model: opus-5-5
This commit is contained in:
@@ -45,6 +45,18 @@ but the review is broader than any of them.
|
||||
|
||||
# Completed Steps
|
||||
|
||||
- 2026-10-04: The Send and confirmation screens no longer show an ETH balance or
|
||||
a network fee below 0.000001 as `0.0`
|
||||
([#343](https://git.eeqj.de/sneak/AutistMask/issues/343)). The stored ETH
|
||||
balance (`src/shared/balances.js`) and the confirmation screen's fee were each
|
||||
cut to six decimal places by a rule of their own. The ETH balance is now
|
||||
stored exactly, and the Send screen's `Current balance`, and the confirmation
|
||||
screen's balance, fee, reserve and insufficient-balance messages, go through
|
||||
`truncateAmountNeverZero()` in `src/shared/amountDisplay.js`, the helper the
|
||||
approval screen already used, so the same fee reads the same on both screens.
|
||||
Token balances are still stored to six decimal places: that cut is also what
|
||||
leaves a holding below 0.000001 off the balance list, and keeps the stored
|
||||
string within the 18 decimals the balance check reads.
|
||||
- 2026-10-03: The typed-data signing screen warns for a token permission, and
|
||||
names the primary type ethers signs
|
||||
([#400](https://git.eeqj.de/sneak/AutistMask/issues/400)). A Permit or Permit2
|
||||
|
||||
Reference in New Issue
Block a user