From 800a5ac5bfe7b1241ec2dd29bbed28503b1bc56c Mon Sep 17 00:00:00 2001 From: howydev <132113803+howydev@users.noreply.github.com> Date: Tue, 17 Dec 2024 22:02:37 -0500 Subject: [PATCH] chore: simplify getExecutionData interface --- account-kit/smart-contracts/src/ma-v2/account/account.ts | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/account-kit/smart-contracts/src/ma-v2/account/account.ts b/account-kit/smart-contracts/src/ma-v2/account/account.ts index f2a8c2715b..71486ee75d 100644 --- a/account-kit/smart-contracts/src/ma-v2/account/account.ts +++ b/account-kit/smart-contracts/src/ma-v2/account/account.ts @@ -50,10 +50,6 @@ export type ValidationDataView = { validationFlags: number; }; -export type ExecutionDataParams = { - selector: Hex; -}; - export type ValidationDataParams = { validationModuleAddress?: Address; entityId?: number; @@ -62,7 +58,7 @@ export type ValidationDataParams = { export type SMAV2Account< TSigner extends SmartAccountSigner = SmartAccountSigner > = SmartContractAccountWithSigner<"SMAV2Account", TSigner, "0.7.0"> & { - getExecutionData: (args: ExecutionDataParams) => Promise; + getExecutionData: (selector: Hex) => Promise; getValidationData: ( args: ValidationDataParams ) => Promise; @@ -189,12 +185,11 @@ export async function createSMAV2Account( client, }); - const getExecutionData = async (args: ExecutionDataParams) => { + const getExecutionData = async (selector: Hex) => { if (!(await baseAccount.isAccountDeployed())) { return {} as ExecutionDataView; } - const { selector } = args; return await accountContract.read.getExecutionData([selector]); };