Found by the re-review of #339 (#339 (comment)). Pre-existing; not introduced there.
src/shared/balances.js:31,39 and src/popup/views/confirmTx.js:299 (formatFeeEth) use a 6-decimal truncation, separate from the 4-decimal rule that #322 fixed. A quantity below 1e-6 renders as 0.0 — visible as Current balance on the send screen, and Balance plus the fee line on the send-confirm screen.
Same failure mode as #322: a nonzero quantity displayed as nothing. The direct consequence of that issue's fix is an inconsistency the repo's own Display Consistency rule forbids — the approval screen's max fee is now floored while the send-confirm screen's fee is not, so the same value renders differently on two screens.
Deliberately NOT in milestone 1.0.0, and the reasoning should be re-examined rather than inherited: unlike the approval-screen case, the understatement here is bounded at 1e-6, these are balance and fee readouts rather than the figure the user is authorizing, and at 6 decimals the hidden quantity is dust for any realistic token. Promote it if that judgement is wrong.
Definition of done
A nonzero balance or fee never renders as 0.0 on the send or send-confirm screens.
The fee is rendered consistently on the send-confirm and approval screens — same value, same string. Prefer routing both through the shared helper in src/shared/amountDisplay.js over adding a fourth truncation rule.
Test: a sub-1e-6 balance and a sub-1e-6 fee each render nonzero. Fails against current head — state the mutation and observed result.
make check green.
Found by the re-review of https://git.eeqj.de/sneak/AutistMask/pulls/339 (https://git.eeqj.de/sneak/AutistMask/pulls/339#issuecomment-69037). Pre-existing; not introduced there.
`src/shared/balances.js:31,39` and `src/popup/views/confirmTx.js:299` (`formatFeeEth`) use a **6-decimal** truncation, separate from the 4-decimal rule that https://git.eeqj.de/sneak/AutistMask/issues/322 fixed. A quantity below 1e-6 renders as `0.0` — visible as `Current balance` on the send screen, and `Balance` plus the fee line on the send-confirm screen.
Same failure mode as https://git.eeqj.de/sneak/AutistMask/issues/322: a nonzero quantity displayed as nothing. The direct consequence of that issue's fix is an inconsistency the repo's own Display Consistency rule forbids — **the approval screen's max fee is now floored while the send-confirm screen's fee is not**, so the same value renders differently on two screens.
Deliberately NOT in milestone 1.0.0, and the reasoning should be re-examined rather than inherited: unlike the approval-screen case, the understatement here is bounded at 1e-6, these are balance and fee readouts rather than the figure the user is authorizing, and at 6 decimals the hidden quantity is dust for any realistic token. Promote it if that judgement is wrong.
## Definition of done
- [ ] A nonzero balance or fee never renders as `0.0` on the send or send-confirm screens.
- [ ] The fee is rendered consistently on the send-confirm and approval screens — same value, same string. Prefer routing both through the shared helper in `src/shared/amountDisplay.js` over adding a fourth truncation rule.
- [ ] Test: a sub-1e-6 balance and a sub-1e-6 fee each render nonzero. Fails against current head — state the mutation and observed result.
- [ ] `make check` green.
Plan. In milestone 1.0.0, so it is fixed now. One PR on a branch cut from next, base next.
Route the send screen's Current balance, and the send-confirm screen's Balance and fee, through the shared display helper in src/shared/amountDisplay.js that the approval screen already uses, and remove the separate 6-decimal truncation in src/shared/balances.js and formatFeeEth in src/popup/views/confirmTx.js if nothing else needs it.
The same fee value renders as the same string on the send-confirm and approval screens.
Unit tests: a sub-1e-6 balance and a sub-1e-6 fee each render nonzero; each fails against current next.
#377 and #372 touch the same screens and follow this unit.
Model: opus-5-5
Plan. In milestone 1.0.0, so it is fixed now. One PR on a branch cut from `next`, base `next`.
- Route the send screen's `Current balance`, and the send-confirm screen's `Balance` and fee, through the shared display helper in `src/shared/amountDisplay.js` that the approval screen already uses, and remove the separate 6-decimal truncation in `src/shared/balances.js` and `formatFeeEth` in `src/popup/views/confirmTx.js` if nothing else needs it.
- The same fee value renders as the same string on the send-confirm and approval screens.
- Unit tests: a sub-1e-6 balance and a sub-1e-6 fee each render nonzero; each fails against current `next`.
- https://git.eeqj.de/sneak/AutistMask/issues/377 and https://git.eeqj.de/sneak/AutistMask/issues/372 touch the same screens and follow this unit.
Model: opus-5-5
Done in #417. The ETH balance is now stored exactly. The send screen's balance, and the send-confirm screen's balance, fee and reserve, use the same display helper as the approval screen, so the same fee reads the same on both. Token balances keep their six-decimal stored value, because it also decides which dust holdings are left off the balance list.
Model: opus-5-5
Done in https://git.eeqj.de/sneak/AutistMask/pulls/417. The ETH balance is now stored exactly. The send screen's balance, and the send-confirm screen's balance, fee and reserve, use the same display helper as the approval screen, so the same fee reads the same on both. Token balances keep their six-decimal stored value, because it also decides which dust holdings are left off the balance list.
Model: opus-5-5
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Found by the re-review of #339 (#339 (comment)). Pre-existing; not introduced there.
src/shared/balances.js:31,39andsrc/popup/views/confirmTx.js:299(formatFeeEth) use a 6-decimal truncation, separate from the 4-decimal rule that #322 fixed. A quantity below 1e-6 renders as0.0— visible asCurrent balanceon the send screen, andBalanceplus the fee line on the send-confirm screen.Same failure mode as #322: a nonzero quantity displayed as nothing. The direct consequence of that issue's fix is an inconsistency the repo's own Display Consistency rule forbids — the approval screen's max fee is now floored while the send-confirm screen's fee is not, so the same value renders differently on two screens.
Deliberately NOT in milestone 1.0.0, and the reasoning should be re-examined rather than inherited: unlike the approval-screen case, the understatement here is bounded at 1e-6, these are balance and fee readouts rather than the figure the user is authorizing, and at 6 decimals the hidden quantity is dust for any realistic token. Promote it if that judgement is wrong.
Definition of done
0.0on the send or send-confirm screens.src/shared/amountDisplay.jsover adding a fourth truncation rule.make checkgreen.Plan. In milestone 1.0.0, so it is fixed now. One PR on a branch cut from
next, basenext.Current balance, and the send-confirm screen'sBalanceand fee, through the shared display helper insrc/shared/amountDisplay.jsthat the approval screen already uses, and remove the separate 6-decimal truncation insrc/shared/balances.jsandformatFeeEthinsrc/popup/views/confirmTx.jsif nothing else needs it.next.Model: opus-5-5
Done in #417. The ETH balance is now stored exactly. The send screen's balance, and the send-confirm screen's balance, fee and reserve, use the same display helper as the approval screen, so the same fee reads the same on both. Token balances keep their six-decimal stored value, because it also decides which dust holdings are left off the balance list.
Model: opus-5-5