decode() in src/shared/uniswap.js renders the Deadline line with new Date(Number(deadline) * 1000).toISOString(). A JavaScript date reaches only to the year 275760, so a deadline above 8640000000000 seconds (for example the uint256 maximum) makes toISOString() throw. The blanket catch { return null } in decode() swallows it, and the approval screen shows the swap as an undecoded contract call with nothing saying why: the same silent failure #350 removes for token scales.
Definition of done
A deadline a date cannot hold is stated on the Deadline line instead of leaving the whole swap undecoded.
Test: a swap whose deadline is the uint256 maximum decodes; it fails against current next.
README.md and TODO.md updated in the same commit where they describe the line.
make check green.
Model: opus-5-5
Found while working on https://git.eeqj.de/sneak/AutistMask/issues/350. Pre-existing.
`decode()` in `src/shared/uniswap.js` renders the `Deadline` line with `new Date(Number(deadline) * 1000).toISOString()`. A JavaScript date reaches only to the year 275760, so a `deadline` above 8640000000000 seconds (for example the `uint256` maximum) makes `toISOString()` throw. The blanket `catch { return null }` in `decode()` swallows it, and the approval screen shows the swap as an undecoded contract call with nothing saying why: the same silent failure https://git.eeqj.de/sneak/AutistMask/issues/350 removes for token scales.
## Definition of done
- [ ] A deadline a date cannot hold is stated on the `Deadline` line instead of leaving the whole swap undecoded.
- [ ] Test: a swap whose deadline is the `uint256` maximum decodes; it fails against current `next`.
- [ ] `README.md` and `TODO.md` updated in the same commit where they describe the line.
- [ ] `make check` green.
Model: opus-5-5
#441: a deadline later than 275760-09-13 00:00:00 UTC no longer leaves the swap undecoded; its Deadline line reads After 275760-09-13 00:00:00 (no deadline in practice). Only the swap line had this throw.
Model: opus-5-5
https://git.eeqj.de/sneak/AutistMask/pulls/441: a deadline later than 275760-09-13 00:00:00 UTC no longer leaves the swap undecoded; its `Deadline` line reads `After 275760-09-13 00:00:00 (no deadline in practice)`. Only the swap line had this throw.
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.
Found while working on #350. Pre-existing.
decode()insrc/shared/uniswap.jsrenders theDeadlineline withnew Date(Number(deadline) * 1000).toISOString(). A JavaScript date reaches only to the year 275760, so adeadlineabove 8640000000000 seconds (for example theuint256maximum) makestoISOString()throw. The blanketcatch { return null }indecode()swallows it, and the approval screen shows the swap as an undecoded contract call with nothing saying why: the same silent failure #350 removes for token scales.Definition of done
Deadlineline instead of leaving the whole swap undecoded.uint256maximum decodes; it fails against currentnext.README.mdandTODO.mdupdated in the same commit where they describe the line.make checkgreen.Model: opus-5-5
#441: a deadline later than 275760-09-13 00:00:00 UTC no longer leaves the swap undecoded; its
Deadlineline readsAfter 275760-09-13 00:00:00 (no deadline in practice). Only the swap line had this throw.Model: opus-5-5