@@ -3,13 +3,7 @@ import {
33 LocalAccountSigner ,
44 type SmartAccountSigner ,
55} from "@aa-sdk/core" ;
6- import {
7- custom ,
8- parseEther ,
9- publicActions ,
10- testActions ,
11- type TestActions ,
12- } from "viem" ;
6+ import { custom , parseEther } from "viem" ;
137import {
148 createModularAccountV2Client ,
159 type SignerEntity ,
@@ -28,17 +22,6 @@ import { alchemyGasAndPaymasterAndDataMiddleware } from "@account-kit/infra";
2822describe ( "MA v2 deferral actions tests" , async ( ) => {
2923 const instance = local070Instance ;
3024
31- let client : ReturnType < typeof instance . getClient > &
32- ReturnType < typeof publicActions > &
33- TestActions ;
34-
35- beforeAll ( async ( ) => {
36- client = instance
37- . getClient ( )
38- . extend ( publicActions )
39- . extend ( testActions ( { mode : "anvil" } ) ) ;
40- } ) ;
41-
4225 const signer : SmartAccountSigner = new LocalAccountSigner (
4326 accounts . fundedAccountOwner
4427 ) ;
@@ -73,25 +56,22 @@ describe("MA v2 deferral actions tests", async () => {
7356 } ) ;
7457
7558 const { typedData, fullPreSignatureDeferredActionDigest } =
76- await new PermissionBuilder ( serverClient )
77- . configure ( {
78- key : {
79- publicKey : await sessionKey . getAddress ( ) ,
80- type : "secp256k1" ,
81- } ,
82- entityId,
83- nonce : nonce ,
84- } )
59+ await new PermissionBuilder ( {
60+ client : serverClient ,
61+ key : {
62+ publicKey : await sessionKey . getAddress ( ) ,
63+ type : "secp256k1" ,
64+ } ,
65+ entityId,
66+ nonce : nonce ,
67+ deadline : 0 ,
68+ } )
8569 . addPermission ( {
8670 permission : {
8771 type : PermissionType . ROOT ,
8872 } ,
8973 } )
90- . compileDeferred ( {
91- deadline : 0 ,
92- uoValidationEntityId : entityId ,
93- uoIsGlobalValidation : true ,
94- } ) ;
74+ . compileDeferred ( ) ;
9575
9676 const sig = await provider . account . signTypedData ( typedData ) ;
9777
0 commit comments