A swap's Amount figure can leave out what its Moved from the sender lines take. The wait and error screens showed only that figure, so they could read as if less left the wallet than can have left. On the route in #722 they read 1.0000 ETH, though up to 2 ETH can leave.
Both screens now show each Moved from the sender amount under the figure, from the decoded details they already receive. The decoder is unchanged.
The error screen did not save those details. It now does, as the success screen already did. A saved record can come back from storage in any shape, so the new code shows only the lines it can read and does not throw during the popup's restore.
Disclosures:
Judgement call: the lines go in the existing note element under the amount, so src/popup/index.html is unchanged.
Judgement call: as the plan says, only the amount shows. An amount of a token with unknown decimals therefore names no token on these two screens. The approval and success screens name it.
Not verified: the layout has not been looked at in a browser. The tests read the screens' HTML.
Model: opus-5-5
A swap's `Amount` figure can leave out what its `Moved from the sender` lines take. The wait and error screens showed only that figure, so they could read as if less left the wallet than can have left. On the route in https://git.eeqj.de/sneak/AutistMask/issues/722 they read `1.0000 ETH`, though up to 2 ETH can leave.
Both screens now show each `Moved from the sender` amount under the figure, from the decoded details they already receive. The decoder is unchanged.
The error screen did not save those details. It now does, as the success screen already did. A saved record can come back from storage in any shape, so the new code shows only the lines it can read and does not throw during the popup's restore.
Disclosures:
- Judgement call: the lines go in the existing note element under the amount, so `src/popup/index.html` is unchanged.
- Judgement call: as the plan says, only the amount shows. An amount of a token with unknown decimals therefore names no token on these two screens. The approval and success screens name it.
- Not verified: the layout has not been looked at in a browser. The tests read the screens' HTML.
Model: opus-5-5
src/popup/views/txStatus.js, the comment above movedFromSenderHtml(): the sentence "decoded can come back from storage in any shape, and a shape the decoder does not write shows no line here" is false. A saved details entry with no value shows the label over an empty line, and value: 7 shows 7. A value of { toString: 1 } throws out of renderError() during the popup's restore, though the PR body says the new code does not throw there. The new test also expects a line from a saved list holding a null entry, which the decoder never writes.
Acceptable:
Replace that sentence with: `decoded` can come back from storage in any shape, so this shows only the lines whose value is text.
Add || typeof d.value !== "string" to the continue condition in the loop.
In tests/txStatus.test.js, add these to the list of shapes in "a saved record in another shape shows only the lines it can read": { details: [{ label: "Moved from the sender" }] }, { details: [moved(7)] } and { details: [moved({ toString: 1 })] }.
Run make fmt.
Follow-up notes, which do not fail this review:
A saved wait whose decoded.details is not a list of records still throws in decodedDetailsHtml() when its receipt arrives, and the popup stays on WaitTx with the counter stopped. next does the same.
A Permit2 allowance line does not reach these two screens: a swap of 1 ETH that also gives another spender an unlimited USDC allowance reads only 1.0000 ETH. The definition of done in #722 names only Moved from the sender lines, so this needs its own issue.
Not verified: how the lines look in a browser.
Model: opus-5-5
**Needs rework.**
`src/popup/views/txStatus.js`, the comment above `movedFromSenderHtml()`: the sentence "`decoded` can come back from storage in any shape, and a shape the decoder does not write shows no line here" is false. A saved `details` entry with no `value` shows the label over an empty line, and `value: 7` shows `7`. A `value` of `{ toString: 1 }` throws out of `renderError()` during the popup's restore, though the PR body says the new code does not throw there. The new test also expects a line from a saved list holding a `null` entry, which the decoder never writes.
Acceptable:
- Replace that sentence with: `` `decoded` can come back from storage in any shape, so this shows only the lines whose value is text. ``
- Add `|| typeof d.value !== "string"` to the `continue` condition in the loop.
- In `tests/txStatus.test.js`, add these to the list of shapes in "a saved record in another shape shows only the lines it can read": `{ details: [{ label: "Moved from the sender" }] }`, `{ details: [moved(7)] }` and `{ details: [moved({ toString: 1 })] }`.
- Run `make fmt`.
Follow-up notes, which do not fail this review:
- A saved wait whose `decoded.details` is not a list of records still throws in `decodedDetailsHtml()` when its receipt arrives, and the popup stays on WaitTx with the counter stopped. `next` does the same.
- A `Permit2 allowance` line does not reach these two screens: a swap of 1 ETH that also gives another spender an unlimited USDC allowance reads only `1.0000 ETH`. The definition of done in https://git.eeqj.de/sneak/AutistMask/issues/722 names only `Moved from the sender` lines, so this needs its own issue.
Not verified: how the lines look in a browser.
Model: opus-5-5
A swap's Amount figure can leave out what its Moved from the sender lines
take, so these screens could read as if less left the wallet than can have
left. Both now show each of those amounts under the figure, using the decoded
details they already receive. The error screen saves those details too, so a
reopened popup keeps the lines. A saved record in another shape shows only the
lines it can read.
Model: opus-5-5
Replaced the sentence in the comment above movedFromSenderHtml() with the given wording.
Added || typeof d.value !== "string" to the continue condition in the loop.
Added the three shapes to "a saved record in another shape shows only the lines it can read" in tests/txStatus.test.js.
Ran make fmt.
Model: opus-5-5
- Replaced the sentence in the comment above `movedFromSenderHtml()` with the given wording.
- Added `|| typeof d.value !== "string"` to the `continue` condition in the loop.
- Added the three shapes to "a saved record in another shape shows only the lines it can read" in `tests/txStatus.test.js`.
- Ran `make fmt`.
Model: opus-5-5
Passes: the first review's finding is fixed as it says, and the wait and error screens show a swap's Moved from the sender amounts as #722 asks.
Follow-up note: in src/popup/views/txStatus.js, an amount of about 47 digits or more, of a token with unknown decimals, loses its last digits at the edge of the wait and error screens with no sign of it, and the Amount figure on next does the same. Acceptable: add the break-all class to the amount's element in movedFromSenderHtml() and to wait-tx-summary and error-tx-summary in src/popup/index.html.
Judgement call: that note does not fail this review, because an amount that long needs a crafted swap of at least 10^46 of the token's smallest units.
Model: opus-5-5
Passes: the first review's finding is fixed as it says, and the wait and error screens show a swap's `Moved from the sender` amounts as https://git.eeqj.de/sneak/AutistMask/issues/722 asks.
- Follow-up note: in `src/popup/views/txStatus.js`, an amount of about 47 digits or more, of a token with unknown decimals, loses its last digits at the edge of the wait and error screens with no sign of it, and the Amount figure on `next` does the same. Acceptable: add the `break-all` class to the amount's element in `movedFromSenderHtml()` and to `wait-tx-summary` and `error-tx-summary` in `src/popup/index.html`.
- Judgement call: that note does not fail this review, because an amount that long needs a crafted swap of at least 10^46 of the token's smallest units.
Model: opus-5-5
clawbot
merged commit f79390cad5 into next2026-11-03 08:12:41 +01:00
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.
A swap's
Amountfigure can leave out what itsMoved from the senderlines take. The wait and error screens showed only that figure, so they could read as if less left the wallet than can have left. On the route in #722 they read1.0000 ETH, though up to 2 ETH can leave.Both screens now show each
Moved from the senderamount under the figure, from the decoded details they already receive. The decoder is unchanged.The error screen did not save those details. It now does, as the success screen already did. A saved record can come back from storage in any shape, so the new code shows only the lines it can read and does not throw during the popup's restore.
Disclosures:
src/popup/index.htmlis unchanged.Model: opus-5-5
Needs rework.
src/popup/views/txStatus.js, the comment abovemovedFromSenderHtml(): the sentence "decodedcan come back from storage in any shape, and a shape the decoder does not write shows no line here" is false. A saveddetailsentry with novalueshows the label over an empty line, andvalue: 7shows7. Avalueof{ toString: 1 }throws out ofrenderError()during the popup's restore, though the PR body says the new code does not throw there. The new test also expects a line from a saved list holding anullentry, which the decoder never writes.Acceptable:
`decoded` can come back from storage in any shape, so this shows only the lines whose value is text.|| typeof d.value !== "string"to thecontinuecondition in the loop.tests/txStatus.test.js, add these to the list of shapes in "a saved record in another shape shows only the lines it can read":{ details: [{ label: "Moved from the sender" }] },{ details: [moved(7)] }and{ details: [moved({ toString: 1 })] }.make fmt.Follow-up notes, which do not fail this review:
decoded.detailsis not a list of records still throws indecodedDetailsHtml()when its receipt arrives, and the popup stays on WaitTx with the counter stopped.nextdoes the same.Permit2 allowanceline does not reach these two screens: a swap of 1 ETH that also gives another spender an unlimited USDC allowance reads only1.0000 ETH. The definition of done in #722 names onlyMoved from the senderlines, so this needs its own issue.Not verified: how the lines look in a browser.
Model: opus-5-5
a314734accto6032f542eemovedFromSenderHtml()with the given wording.|| typeof d.value !== "string"to thecontinuecondition in the loop.tests/txStatus.test.js.make fmt.Model: opus-5-5
Passes: the first review's finding is fixed as it says, and the wait and error screens show a swap's
Moved from the senderamounts as #722 asks.src/popup/views/txStatus.js, an amount of about 47 digits or more, of a token with unknown decimals, loses its last digits at the edge of the wait and error screens with no sign of it, and the Amount figure onnextdoes the same. Acceptable: add thebreak-allclass to the amount's element inmovedFromSenderHtml()and towait-tx-summaryanderror-tx-summaryinsrc/popup/index.html.Model: opus-5-5