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

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. It
now prices the exact value with getPrice("ETH", chainId) for the
transaction's chain id, as ConfirmTx does.

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:07:04 +00:00
parent 5b264f4b3e
commit a388a66e97
4 changed files with 182 additions and 8 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