diff --git a/.changeset/four-eggs-deny.md b/.changeset/four-eggs-deny.md new file mode 100644 index 00000000..c4caa9ca --- /dev/null +++ b/.changeset/four-eggs-deny.md @@ -0,0 +1,5 @@ +--- +"permissionless": patch +--- + +Fixed `signUserOperation` for `toSafeSmartAccount` when owner is not a LocalAccount. diff --git a/packages/permissionless-test/src/testWithRpc.ts b/packages/permissionless-test/src/testWithRpc.ts index 3d02a66e..c7c965bc 100644 --- a/packages/permissionless-test/src/testWithRpc.ts +++ b/packages/permissionless-test/src/testWithRpc.ts @@ -30,11 +30,16 @@ export const getInstances = async ({ | string | undefined - const anvilInstance = anvil({ - chainId: foundry.id, - port: anvilPort, - forkUrl - }) + const anvilInstance = forkUrl + ? anvil({ + chainId: foundry.id, + port: anvilPort, + forkUrl + }) + : anvil({ + chainId: foundry.id, + port: anvilPort + }) const altoInstance = alto({ entrypoints: [entryPoint06Address, entryPoint07Address], diff --git a/packages/permissionless/accounts/safe/toSafeSmartAccount.ts b/packages/permissionless/accounts/safe/toSafeSmartAccount.ts index e49dd5f7..c76b468d 100644 --- a/packages/permissionless/accounts/safe/toSafeSmartAccount.ts +++ b/packages/permissionless/accounts/safe/toSafeSmartAccount.ts @@ -1525,7 +1525,7 @@ export async function toSafeSmartAccount< let signatures: Hex | undefined = undefined - for (const owner of owners) { + for (const owner of localOwners) { signatures = await signUserOperation({ ...userOperation, version,