From 79ce26e2998f92d277dae3d173d824c0be6ba77d Mon Sep 17 00:00:00 2001 From: Rodrigo Fournier Date: Fri, 23 Jan 2026 11:41:05 +1100 Subject: [PATCH] fix(orderbook): keep domain.chainId numeric for viem EIP712Domain inference Viem only includes chainId in the inferred EIP712Domain type when domain.chainId is a number or bigint. The cancellation payload was passing chainId as a string (via .toString()), which caused viem to infer EIP712Domain without chainId. That led to Guardian/go-ethereum failing with: 'there is extra data provided in the message (2 < 3)' when the domain object still contained chainId. This change normalizes chainId to a number for cancellation typed data. --- packages/orderbook/src/orderbook.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/orderbook/src/orderbook.ts b/packages/orderbook/src/orderbook.ts index a805cd4722..095d7a4c22 100644 --- a/packages/orderbook/src/orderbook.ts +++ b/packages/orderbook/src/orderbook.ts @@ -418,7 +418,7 @@ export class Orderbook { orderHash: listing.orderHash, orderSignature: sig, makerFees: listingParam.makerFees, - // Swallow failed creations - this gets mapped in the response to the caller as failed + // Swallow failed creations - this gets mapped in the response to the caller as failed }).catch(() => undefined); }), ); @@ -748,7 +748,7 @@ export class Orderbook { const network = await this.orderbookConfig.provider.getNetwork(); const domain = { name: 'imtbl-order-book', - chainId: network.chainId.toString(), + chainId: Number(network.chainId), verifyingContract: this.orderbookConfig.seaportContractAddress, };