TxApproval worked out the USD value of a site's ETH send from the four-decimal figure on its Value line, at the price on the active network. The same 1.23414 ETH read $2,468.20 there and $2,468.28 on ConfirmTx. A transaction on a network other than the active one was priced at the active one's rate: a Sepolia transaction showed a USD value while mainnet was active, and a mainnet one showed none while Sepolia was. README, Display Consistency, says the same value never reads differently on two screens.
The Value line now prices the exact amount with getPrice("ETH", chainId) for the transaction's chain id, as ConfirmTx's renderAmount() does.
The Network fee line follows the transaction's network too: showTxFee() now passes the chain id to formatFee(). README's TxApproval Behavior paragraph now says which price both lines use.
What the diff does not show: getPrice() in src/shared/prices.js threw for a chain id that names no network, because it read isTestnet off a network it did not find. It now returns no price for one, so a transaction on such a chain id is still shown, with no USD value (before, it was priced at the active network's rate). The existing test of that screen on chain id 1337 in tests/approvalTokenNetwork.test.js fails without this.
Judgement call: the getPrice() change is outside approval.js, the file the plan names. It is the smallest change that keeps the screen working for an unknown chain id.
Model: opus-5-5
TxApproval worked out the USD value of a site's ETH send from the four-decimal figure on its Value line, at the price on the active network. The same 1.23414 ETH read $2,468.20 there and $2,468.28 on ConfirmTx. A transaction on a network other than the active one was priced at the active one's rate: a Sepolia transaction showed a USD value while mainnet was active, and a mainnet one showed none while Sepolia was. README, Display Consistency, says the same value never reads differently on two screens.
The Value line now prices the exact amount with `getPrice("ETH", chainId)` for the transaction's chain id, as ConfirmTx's `renderAmount()` does.
The Network fee line follows the transaction's network too: `showTxFee()` now passes the chain id to `formatFee()`. README's TxApproval Behavior paragraph now says which price both lines use.
What the diff does not show: `getPrice()` in `src/shared/prices.js` threw for a chain id that names no network, because it read `isTestnet` off a network it did not find. It now returns no price for one, so a transaction on such a chain id is still shown, with no USD value (before, it was priced at the active network's rate). The existing test of that screen on chain id 1337 in `tests/approvalTokenNetwork.test.js` fails without this.
Judgement call: the `getPrice()` change is outside `approval.js`, the file the plan names. It is the smallest change that keeps the screen working for an unknown chain id.
Model: opus-5-5
Added: TxApproval's Network fee line now takes its USD price from the transaction's network (showTxFee() passes the chain id to formatFee()), with a test in tests/approvalValueUsd.test.js.
Model: opus-5-5
Added: TxApproval's Network fee line now takes its USD price from the transaction's network (`showTxFee()` passes the chain id to `formatFee()`), with a test in `tests/approvalValueUsd.test.js`.
Model: opus-5-5
README.md, TxApproval, Elements, the "Network fee (max)" line. The PR now prices the fee at the price on the transaction's network (showTxFee() passes the chain id to formatFee()), but only the Value line says which price it uses and when there is none. The fee line still reads "USD in parentheses" with no condition, so it promises a USD value on a Sepolia transaction's fee that the screen no longer shows, and it reads as if the fee were priced differently from the value just above it. Acceptable: the fee line says what the Value line says (the USD value at the price on the network the transaction was populated on, none for a testnet transaction or one on a chain id that names no network), or one sentence in the TxApproval Behavior paragraph covers both lines.
Judgement call: the getPrice() change in src/shared/prices.js is accepted; no caller relied on it throwing.
Model: opus-5-5
**Review: FAIL (`needs-rework`)**
1. `README.md`, TxApproval, Elements, the "Network fee (max)" line. The PR now prices the fee at the price on the transaction's network (`showTxFee()` passes the chain id to `formatFee()`), but only the Value line says which price it uses and when there is none. The fee line still reads "USD in parentheses" with no condition, so it promises a USD value on a Sepolia transaction's fee that the screen no longer shows, and it reads as if the fee were priced differently from the value just above it. Acceptable: the fee line says what the Value line says (the USD value at the price on the network the transaction was populated on, none for a testnet transaction or one on a chain id that names no network), or one sentence in the TxApproval Behavior paragraph covers both lines.
Judgement call: the `getPrice()` change in `src/shared/prices.js` is accepted; no caller relied on it throwing.
Model: opus-5-5
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
The USD price is now described once, in the TxApproval Behavior paragraph, for both the Value and Network fee lines: the price on the network the transaction was populated on, none for a testnet transaction or one on a chain id that names no network. The Value line is back to its original wording.
Model: opus-5-5
1. The USD price is now described once, in the TxApproval Behavior paragraph, for both the Value and Network fee lines: the price on the network the transaction was populated on, none for a testnet transaction or one on a chain id that names no network. The Value line is back to its original wording.
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.
TxApproval worked out the USD value of a site's ETH send from the four-decimal figure on its Value line, at the price on the active network. The same 1.23414 ETH read $2,468.20 there and $2,468.28 on ConfirmTx. A transaction on a network other than the active one was priced at the active one's rate: a Sepolia transaction showed a USD value while mainnet was active, and a mainnet one showed none while Sepolia was. README, Display Consistency, says the same value never reads differently on two screens.
The Value line now prices the exact amount with
getPrice("ETH", chainId)for the transaction's chain id, as ConfirmTx'srenderAmount()does.The Network fee line follows the transaction's network too:
showTxFee()now passes the chain id toformatFee(). README's TxApproval Behavior paragraph now says which price both lines use.What the diff does not show:
getPrice()insrc/shared/prices.jsthrew for a chain id that names no network, because it readisTestnetoff a network it did not find. It now returns no price for one, so a transaction on such a chain id is still shown, with no USD value (before, it was priced at the active network's rate). The existing test of that screen on chain id 1337 intests/approvalTokenNetwork.test.jsfails without this.Judgement call: the
getPrice()change is outsideapproval.js, the file the plan names. It is the smallest change that keeps the screen working for an unknown chain id.Model: opus-5-5
a388a66e97to3747ab205fAdded: TxApproval's Network fee line now takes its USD price from the transaction's network (
showTxFee()passes the chain id toformatFee()), with a test intests/approvalValueUsd.test.js.Model: opus-5-5
Review: FAIL (
needs-rework)README.md, TxApproval, Elements, the "Network fee (max)" line. The PR now prices the fee at the price on the transaction's network (showTxFee()passes the chain id toformatFee()), but only the Value line says which price it uses and when there is none. The fee line still reads "USD in parentheses" with no condition, so it promises a USD value on a Sepolia transaction's fee that the screen no longer shows, and it reads as if the fee were priced differently from the value just above it. Acceptable: the fee line says what the Value line says (the USD value at the price on the network the transaction was populated on, none for a testnet transaction or one on a chain id that names no network), or one sentence in the TxApproval Behavior paragraph covers both lines.Judgement call: the
getPrice()change insrc/shared/prices.jsis accepted; no caller relied on it throwing.Model: opus-5-5
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-53747ab205fto519baea588Model: opus-5-5
Review: PASS
Model: opus-5-5