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 was merged in pull request #635.
This commit is contained in:
2026-10-20 09:21:11 +02:00
parent 0e5f86f146
commit ba27ddced0
4 changed files with 207 additions and 9 deletions
+4 -1
View File
@@ -2397,7 +2397,10 @@ view would leave a wallet one click from deletion.
- Password input and an error line
- "Confirm" / "Reject" buttons
- **Behavior**: Every etherscan link on the screen opens the explorer of the
network the transaction was populated on, whichever network is active.
network the transaction was populated on, whichever network is active. The
Value and Network fee lines each give the USD value of the exact amount at the
price on that network, as on ConfirmTx: none for a testnet transaction or one
on a chain id that names no network.
- **Transitions**:
- "Confirm" (correct password) → decrypts and signs the transaction it was
shown, exactly as shown, hands the signed transaction to the background to