From f8f7773f446d52f5e191567b9c4a94686bf3923e Mon Sep 17 00:00:00 2001 From: Fibonacci747 Date: Mon, 22 Sep 2025 11:12:28 +0200 Subject: [PATCH] fix(sign): handle undeployed contract by checking code === '0x' or null --- .../account-sdk/src/sign/base-account/utils/findOwnerIndex.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/account-sdk/src/sign/base-account/utils/findOwnerIndex.ts b/packages/account-sdk/src/sign/base-account/utils/findOwnerIndex.ts index 67b6f441..6d2acc36 100644 --- a/packages/account-sdk/src/sign/base-account/utils/findOwnerIndex.ts +++ b/packages/account-sdk/src/sign/base-account/utils/findOwnerIndex.ts @@ -40,7 +40,7 @@ export async function findOwnerIndex({ // Check index of owner in the factoryData // Note: importing an undeployed contract might need to be handled differently // The implemention will likely require the signer to tell us the index - if (!code && factory && factoryData) { + if ((code === '0x' || code == null) && factory && factoryData) { const initData = decodeFunctionData({ abi: factoryAbi, data: factoryData,