TxApproval, src/popup/views/approval.js. The USD value of a site's ETH send is worked out from the shortened figure (parseFloat(ethValueFormatted) * ethPrice), with the price from getPrice("ETH"), which follows the active network rather than the transaction's.
What happens
The same amount, say 1.23414 ETH, gets a USD value a few cents different on TxApproval than on ConfirmTx, which prices the exact amount on the network the transaction was reviewed for. When the transaction's network differs from the active one, TxApproval prices it at the active network's rate.
What should happen
README, Display Consistency: the same value is never rendered differently on two screens. TxApproval prices the exact amount, at the price of the transaction's own network, as ConfirmTx does.
Severity: minor
Definition of done
TxApproval's USD value for an ETH send comes from the exact amount and the transaction's network's price.
A test with an amount whose shortened and exact USD values differ.
Model: opus-5-5
Seen by the review of https://git.eeqj.de/sneak/AutistMask/pulls/613.
## Where
TxApproval, `src/popup/views/approval.js`. The USD value of a site's ETH send is worked out from the shortened figure (`parseFloat(ethValueFormatted) * ethPrice`), with the price from `getPrice("ETH")`, which follows the active network rather than the transaction's.
## What happens
The same amount, say 1.23414 ETH, gets a USD value a few cents different on TxApproval than on ConfirmTx, which prices the exact amount on the network the transaction was reviewed for. When the transaction's network differs from the active one, TxApproval prices it at the active network's rate.
## What should happen
README, Display Consistency: the same value is never rendered differently on two screens. TxApproval prices the exact amount, at the price of the transaction's own network, as ConfirmTx does.
Severity: minor
## Definition of done
- [ ] TxApproval's USD value for an ETH send comes from the exact amount and the transaction's network's price.
- [ ] A test with an amount whose shortened and exact USD values differ.
Model: opus-5-5
clawbot
self-assigned this 2026-10-19 15:39:54 +02:00
Plan: one PR to next, in src/popup/views/approval.js. TxApproval works out the USD value of a site's ETH send from the exact amount (the full ether value of the transaction, not the shortened figure it shows) and takes the price with getPrice("ETH", chainId) for the transaction's chain id, as ConfirmTx's renderAmount() does. A Jest test with an amount whose shortened and exact USD values differ, and one with the transaction's network not the active one, each failing on next.
Model: opus-5-5
Plan: one PR to `next`, in `src/popup/views/approval.js`. TxApproval works out the USD value of a site's ETH send from the exact amount (the full ether value of the transaction, not the shortened figure it shows) and takes the price with `getPrice("ETH", chainId)` for the transaction's chain id, as ConfirmTx's `renderAmount()` does. A Jest test with an amount whose shortened and exact USD values differ, and one with the transaction's network not the active one, each failing on `next`.
Model: opus-5-5
Built in #635. TxApproval's Value line now prices the exact amount at the price of the transaction's own network, as ConfirmTx does. getPrice() now gives no price for a chain id that names no network instead of throwing, so a transaction on such a chain id shows no USD value.
Model: opus-5-5
Built in https://git.eeqj.de/sneak/AutistMask/pulls/635. TxApproval's Value line now prices the exact amount at the price of the transaction's own network, as ConfirmTx does. `getPrice()` now gives no price for a chain id that names no network instead of throwing, so a transaction on such a chain id shows no USD value.
Model: opus-5-5
Plan, extended before review: TxApproval's Network fee line has the same fault, formatFee() in showTxFee() called without the transaction's chain id, so it is priced at the active network's rate. #635 passes the chain id there too, with a test, so every USD value on TxApproval follows the transaction's network.
Model: opus-5-5
Plan, extended before review: TxApproval's Network fee line has the same fault, `formatFee()` in `showTxFee()` called without the transaction's chain id, so it is priced at the active network's rate. https://git.eeqj.de/sneak/AutistMask/pulls/635 passes the chain id there too, with a test, so every USD value on TxApproval follows the transaction's network.
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.
Seen by the review of #613.
Where
TxApproval,
src/popup/views/approval.js. The USD value of a site's ETH send is worked out from the shortened figure (parseFloat(ethValueFormatted) * ethPrice), with the price fromgetPrice("ETH"), which follows the active network rather than the transaction's.What happens
The same amount, say 1.23414 ETH, gets a USD value a few cents different on TxApproval than on ConfirmTx, which prices the exact amount on the network the transaction was reviewed for. When the transaction's network differs from the active one, TxApproval prices it at the active network's rate.
What should happen
README, Display Consistency: the same value is never rendered differently on two screens. TxApproval prices the exact amount, at the price of the transaction's own network, as ConfirmTx does.
Severity: minor
Definition of done
Model: opus-5-5
Plan: one PR to
next, insrc/popup/views/approval.js. TxApproval works out the USD value of a site's ETH send from the exact amount (the full ether value of the transaction, not the shortened figure it shows) and takes the price withgetPrice("ETH", chainId)for the transaction's chain id, as ConfirmTx'srenderAmount()does. A Jest test with an amount whose shortened and exact USD values differ, and one with the transaction's network not the active one, each failing onnext.Model: opus-5-5
Built in #635. TxApproval's Value line now prices the exact amount at the price of the transaction's own network, as ConfirmTx does.
getPrice()now gives no price for a chain id that names no network instead of throwing, so a transaction on such a chain id shows no USD value.Model: opus-5-5
Plan, extended before review: TxApproval's Network fee line has the same fault,
formatFee()inshowTxFee()called without the transaction's chain id, so it is priced at the active network's rate. #635 passes the chain id there too, with a test, so every USD value on TxApproval follows the transaction's network.Model: opus-5-5