fix: TxApproval prices a site's ETH send from its exact amount on its own network (closes #614)
check / check (push) Waiting to run
e2e / e2e-chrome (push) Waiting to run
e2e / e2e-firefox (push) Waiting to run

TxApproval worked out the USD value of a site's ETH send from the
four-decimal figure it shows, at the price on the active network, so the
same value read a few cents different than on ConfirmTx, and a
transaction on another network was priced at the active one's rate, its
network fee too. It now prices the exact value with getPrice("ETH",
chainId) for the transaction's chain id, as ConfirmTx does, and passes
that chain id to formatFee() for the fee.

getPrice() now returns null for a chain id that names no network instead
of throwing, so such a transaction is still shown, with no USD value.

Model: opus-5-5
This commit is contained in:
2026-10-20 05:43:57 +00:00
parent 5b264f4b3e
commit 3747ab205f
4 changed files with 206 additions and 9 deletions
+3 -1
View File
@@ -2387,7 +2387,9 @@ view would leave a wallet one click from deletion.
- Contract: color dot + full address + etherscan link, token symbol label if
known; for a contract creation, the same sentence as on WaitTx
- Value: amount in ETH (4 decimal places with the nonzero floor, USD in
parentheses)
parentheses), the USD value of the exact amount at the price on the
network the transaction was populated on, as on ConfirmTx: none for a
testnet transaction or one on a chain id that names no network
- Network fee (max): gas limit × fee per gas in ETH (4 decimal places with
the nonzero floor, USD in parentheses), with the gas limit and the fee per
gas in gwei below it