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. The ETH balance is now stored exactly, and the send and send-confirm screens' balances, reserve and insufficient-balance messages go through truncateAmountNeverZero(). Both the send-confirm and approval screens render the fee through formatFee(), which prices the exact fee in USD, so the same fee reads the same on both. Token balances keep their six-decimal value: it also 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,20 @@ 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. The confirmation and approval screens both
|
||||
render the fee through `formatFee()` in `src/popup/views/helpers.js`, which
|
||||
prices the exact fee in USD, so the same fee reads the same on both, USD value
|
||||
included. 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