fix: a V4 swap action not in the deployed shape is shown as not decoded (closes #358)
check / check (push) Waiting to run
e2e / e2e-chrome (push) Waiting to run
e2e / e2e-firefox (push) Waiting to run

The four V4 swap actions are read only as the structs deployed on mainnet
and Sepolia. ethers read the newer v4-periphery structs, which add
minHopPriceX36, as the deployed ones, and the newer multi-hop exact-in
struct showed the offset of its hop-price array as the swap amount. A
decode now counts only when encoding it again gives back the same bytes.
A swap action that fails that marks its step "V4 Swap (could not be
decoded)", and a side its SETTLE or TAKE did not name reads "Unknown
(could not be decoded)". The wait and error screens no longer show the
ETH value as the amount of a swap whose amount was not read.

Model: opus-5-5
This commit is contained in:
2026-10-15 23:43:05 +00:00
parent f4551dcb67
commit 08fa969cd6
7 changed files with 692 additions and 49 deletions
+5 -1
View File
@@ -97,7 +97,11 @@ describe("an execute() whose input currency never decoded", () => {
]);
test("says the input token is unknown instead of naming ETH", () => {
expect(detail(data(), "Token In").value).toBe(REFUSAL);
// The swap action that would name it could not be read, so the line
// says that rather than REFUSAL's "not named in the calldata".
expect(detail(data(), "Token In").value).toBe(
"Unknown (could not be decoded)",
);
});
test("keeps a Token In line, so the screen never omits what is paid", () => {