From af6710731febc1a6089aa46d65dca4bdbc65f702 Mon Sep 17 00:00:00 2001 From: Cho Young-Hwi Date: Sat, 28 Mar 2026 18:20:52 +0000 Subject: [PATCH] =?UTF-8?q?[#625]=20Fix=20EIP-712=20chainId:=20BigInt=20?= =?UTF-8?q?=E2=86=92=20Number=20for=20Farcaster=20wallet=20compat?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Farcaster wallet expects chainId as a number, but BigInt(BASE_CHAIN_ID) gets serialized to string "8453" by viem's stringify, causing "Unable to parse chainId" errors. BASE_CHAIN_ID is already a Number, so the BigInt wrapping was unnecessary. Fixes #625 Co-Authored-By: Claude Opus 4.6 (1M context) --- src/components/AgentManage.tsx | 2 +- src/components/AgentRegister.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/AgentManage.tsx b/src/components/AgentManage.tsx index cdb1cec6..0385a71a 100644 --- a/src/components/AgentManage.tsx +++ b/src/components/AgentManage.tsx @@ -21,7 +21,7 @@ const LLM_MODELS = [ const EIP712_DOMAIN = { name: "ERC8004IdentityRegistry", version: "1", - chainId: BigInt(BASE_CHAIN_ID), + chainId: Number(BASE_CHAIN_ID), verifyingContract: ERC8004_REGISTRY, } as const; diff --git a/src/components/AgentRegister.tsx b/src/components/AgentRegister.tsx index ba1101d3..1d093410 100644 --- a/src/components/AgentRegister.tsx +++ b/src/components/AgentRegister.tsx @@ -23,7 +23,7 @@ type WizardStep = 1 | 2 | "3a" | "3b" | "3c" | "done"; const EIP712_DOMAIN = { name: "ERC8004IdentityRegistry", version: "1", - chainId: BigInt(BASE_CHAIN_ID), + chainId: Number(BASE_CHAIN_ID), verifyingContract: ERC8004_REGISTRY, } as const;