diff --git a/contracts/smart-account/handler/DefaultCallbackHandler.sol b/contracts/smart-account/handler/DefaultCallbackHandler.sol index 02587dba..5f6a0e72 100644 --- a/contracts/smart-account/handler/DefaultCallbackHandler.sol +++ b/contracts/smart-account/handler/DefaultCallbackHandler.sol @@ -18,11 +18,14 @@ contract DefaultCallbackHandler is IERC721TokenReceiver, IERC165 { + string public constant NAME = "Default Callback Handler"; + string public constant VERSION = "1.0.0"; error NonExistingMethodCalled(bytes4 selector); - string public constant NAME = "Default Callback Handler"; - string public constant VERSION = "1.0.0"; + fallback() external { + revert NonExistingMethodCalled(msg.sig); + } function supportsInterface( bytes4 interfaceId @@ -73,8 +76,4 @@ contract DefaultCallbackHandler is ) external pure override { // We implement this for completeness, doesn't really have any value } - - fallback() external { - revert NonExistingMethodCalled(msg.sig); - } } diff --git a/contracts/smart-account/modules/AccountRecoveryModule.sol b/contracts/smart-account/modules/AccountRecoveryModule.sol index 92ea6407..4a458753 100644 --- a/contracts/smart-account/modules/AccountRecoveryModule.sol +++ b/contracts/smart-account/modules/AccountRecoveryModule.sol @@ -184,14 +184,14 @@ contract AccountRecoveryModule is BaseAuthorizationModule { // otherwise we need to check all the signatures first uint256 requiredSignatures = _smartAccountSettings[userOp.sender] .recoveryThreshold; - if (requiredSignatures == 0) - revert("AccRecovery: Threshold not set"); + if (requiredSignatures == 0) revert("AccRecovery: Threshold not set"); + + bytes calldata moduleSignature = userOp.signature[96:]; - (bytes memory signatures, ) = abi.decode( - userOp.signature, - (bytes, address) + require( + moduleSignature.length >= requiredSignatures * 2 * 65, + "AccRecovery: Invalid Sigs Length" ); - require(signatures.length >= requiredSignatures * 2 * 65, "AccRecovery: Invalid Sigs Length"); address lastGuardianAddress; address currentGuardianAddress; @@ -205,12 +205,12 @@ contract AccountRecoveryModule is BaseAuthorizationModule { address currentUserOpSignerAddress = userOpHash .toEthSignedMessageHash() .recover( - userOp.signature[96 + 2 * i * 65:96 + (2 * i + 1) * 65] + moduleSignature[2 * i * 65:(2 * i + 1) * 65] ); - currentGuardianSig = userOp.signature[96 + (2 * i + 1) * 65:96 + - (2 * i + 2) * - 65]; + currentGuardianSig = moduleSignature[ + (2 * i + 1) * 65 : (2 * i + 2) * 65 + ]; currentGuardianAddress = CONTROL_HASH .toEthSignedMessageHash() diff --git a/test/module/AccountRecovery.Module.specs.ts b/test/module/AccountRecovery.Module.specs.ts index 2ad62b10..1e46ba8c 100644 --- a/test/module/AccountRecovery.Module.specs.ts +++ b/test/module/AccountRecovery.Module.specs.ts @@ -13,7 +13,7 @@ import { makeEcdsaModuleUserOp, makeUnsignedUserOp, getUserOpHash, - fillUserOp + fillUserOp, } from "../utils/userOp"; import { makeMultiSignedUserOpWithGuardiansList, @@ -44,7 +44,7 @@ describe("Account Recovery Module: ", async () => { const mockToken = await getMockToken(); const entryPoint = await getEntryPoint(); - const { chainId } = await entryPoint.provider.getNetwork() + const { chainId } = await entryPoint.provider.getNetwork(); const ecdsaModule = await getEcdsaOwnershipRegistryModule(); const EcdsaOwnershipRegistryModule = await ethers.getContractFactory( @@ -96,7 +96,7 @@ describe("Account Recovery Module: ", async () => { [ guardians, [ - [closestValidUntil, 0], //2025 + [closestValidUntil, 0], // 2025 [16741936496, 0], [16741936496, 0], ], @@ -682,12 +682,8 @@ describe("Account Recovery Module: ", async () => { describe("submitRecoveryRequest", async () => { it("Should be able to submit the recovery request validated via other modules", async () => { - const { - entryPoint, - accountRecoveryModule, - ecdsaModule, - userSA, - } = await setupTests(); + const { entryPoint, accountRecoveryModule, ecdsaModule, userSA } = + await setupTests(); const recoveryRequestCallData = ecdsaModule.interface.encodeFunctionData( "transferOwnership", @@ -807,9 +803,7 @@ describe("Account Recovery Module: ", async () => { const renounceTxn = await accountRecoveryModule.renounceRecoveryRequest(); expect(renounceTxn) .to.emit(accountRecoveryModule, "RecoveryRequestRenounced") - .withArgs( - deployer.address, - ); + .withArgs(deployer.address); const recoveryRequestAfter = await accountRecoveryModule.getRecoveryRequest(deployer.address); @@ -817,9 +811,7 @@ describe("Account Recovery Module: ", async () => { ethers.utils.hexZeroPad(ethers.utils.hexlify(0), 32) ); - expect(recoveryRequestAfter.callDataHash).to.equal( - emptyGuardian - ); + expect(recoveryRequestAfter.callDataHash).to.equal(emptyGuardian); }); it("Does not revert even if the request for the caller is empty", async () => { @@ -837,7 +829,7 @@ describe("Account Recovery Module: ", async () => { accountRecoveryModule, ecdsaModule, controlMessage, - arrayOfSigners + arrayOfSigners, } = await setupTests(); const userOp = await makeMultisignedSubmitRecoveryRequestUserOp( @@ -884,7 +876,6 @@ describe("Account Recovery Module: ", async () => { .to.be.revertedWith("FailedOp") .withArgs(0, "AA22 expired or not due"); }); - it("Can submit a recovery request and execute it after a proper delay (no bundler)", async () => { const { @@ -894,7 +885,7 @@ describe("Account Recovery Module: ", async () => { ecdsaModule, defaultSecurityDelay, controlMessage, - arrayOfSigners + arrayOfSigners, } = await setupTests(); expect( @@ -965,7 +956,7 @@ describe("Account Recovery Module: ", async () => { accountRecoveryModule, ecdsaModule, controlMessage, - arrayOfSigners + arrayOfSigners, } = await setupTests(); const recoveryRequestCallData = userSA.interface.encodeFunctionData( @@ -1016,7 +1007,7 @@ describe("Account Recovery Module: ", async () => { accountRecoveryModule, ecdsaModule, controlMessage, - arrayOfSigners + arrayOfSigners, } = await setupTests(); const changeSecurityDelayData = @@ -1185,7 +1176,7 @@ describe("Account Recovery Module: ", async () => { accountRecoveryModule, ecdsaModule, controlMessage, - arrayOfSigners + arrayOfSigners, } = await setupTests(); const changeSecurityDelayData = @@ -1261,7 +1252,7 @@ describe("Account Recovery Module: ", async () => { accountRecoveryModule, ecdsaModule, controlMessage, - arrayOfSigners + arrayOfSigners, } = await setupTests(); // the userOp.callData is not the submitRequest one @@ -1295,7 +1286,7 @@ describe("Account Recovery Module: ", async () => { accountRecoveryModule, ecdsaModule, controlMessage, - arrayOfSigners + arrayOfSigners, } = await setupTests(); const changeSecurityDelayData = @@ -1354,7 +1345,7 @@ describe("Account Recovery Module: ", async () => { accountRecoveryModule, ecdsaModule, controlMessage, - arrayOfSigners + arrayOfSigners, } = await setupTests(); const userOp = await makeMultisignedSubmitRecoveryRequestUserOp( @@ -1400,7 +1391,7 @@ describe("Account Recovery Module: ", async () => { ecdsaModule, aliceSA, controlMessage, - arrayOfSigners + arrayOfSigners, } = await setupTests(); const enableUserOp = await makeEcdsaModuleUserOp( @@ -1411,10 +1402,7 @@ describe("Account Recovery Module: ", async () => { entryPoint, ecdsaModule.address ); - await entryPoint.handleOps( - [enableUserOp], - refundReceiver.address - ); + await entryPoint.handleOps([enableUserOp], refundReceiver.address); const userOp = await makeMultisignedSubmitRecoveryRequestUserOp( "transferOwnership", @@ -1436,14 +1424,9 @@ describe("Account Recovery Module: ", async () => { .withArgs(0, "AA23 reverted: AccRecovery: Threshold not set"); }); - it("Should revert if trying to submit the unsigned request ('signature' is empty)", async () => { - const { - entryPoint, - userSA, - accountRecoveryModule, - ecdsaModule, - } = await setupTests(); + const { entryPoint, userSA, accountRecoveryModule, ecdsaModule } = + await setupTests(); const userOp = await makeUnsignedUserOp( "execute", @@ -1480,7 +1463,7 @@ describe("Account Recovery Module: ", async () => { accountRecoveryModule, ecdsaModule, controlMessage, - arrayOfSigners + arrayOfSigners, } = await setupTests(); const userOp = await makeMultisignedSubmitRecoveryRequestUserOp( @@ -1491,7 +1474,7 @@ describe("Account Recovery Module: ", async () => { [charlie, alice], controlMessage, entryPoint, - accountRecoveryModule, + accountRecoveryModule ); await expect( @@ -1509,10 +1492,10 @@ describe("Account Recovery Module: ", async () => { ecdsaModule, controlMessage, closestValidUntil, - arrayOfSigners + arrayOfSigners, } = await setupTests(); - //warp to the closest validUntil + some time + // warp to the closest validUntil + some time await ethers.provider.send("evm_setNextBlockTimestamp", [ closestValidUntil + 12, ]); @@ -1538,7 +1521,6 @@ describe("Account Recovery Module: ", async () => { }); it("Should revert if at least one guardian is not yet active", async () => { - const { entryPoint, userSA, @@ -1546,13 +1528,12 @@ describe("Account Recovery Module: ", async () => { ecdsaModule, controlMessage, guardians, - arrayOfSigners + arrayOfSigners, } = await setupTests(); // current timestamp - const currentTimestamp = ( - await ethers.provider.getBlock("latest") - ).timestamp; + const currentTimestamp = (await ethers.provider.getBlock("latest")) + .timestamp; const changeGuardianUserOp = await makeEcdsaModuleUserOp( "execute", @@ -1561,10 +1542,7 @@ describe("Account Recovery Module: ", async () => { ethers.utils.parseEther("0"), accountRecoveryModule.interface.encodeFunctionData( "changeGuardianParams", - [ - guardians[0], - [17641936496, currentTimestamp + 1000], - ] + [guardians[0], [17641936496, currentTimestamp + 1000]] ), ], userSA.address, @@ -1602,15 +1580,14 @@ describe("Account Recovery Module: ", async () => { accountRecoveryModule, ecdsaModule, controlMessage, - guardians, + guardians, closestValidUntil, - arrayOfSigners + arrayOfSigners, } = await setupTests(); // current timestamp - const currentTimestamp = ( - await ethers.provider.getBlock("latest") - ).timestamp; + const currentTimestamp = (await ethers.provider.getBlock("latest")) + .timestamp; const changeGuardianUserOp = await makeEcdsaModuleUserOp( "execute", @@ -1655,7 +1632,6 @@ describe("Account Recovery Module: ", async () => { ) .to.be.revertedWith("FailedOp") .withArgs(0, "AA22 expired or not due"); - }); it("Should return SIG_VALIDATION_FAILED if at least one signature is invalid", async () => { @@ -1671,7 +1647,7 @@ describe("Account Recovery Module: ", async () => { "transferOwnership", [newOwner.address], ecdsaModule, - userSA.address, + userSA.address, [charlie, alice, eve], // eve is not a guardian controlMessage, entryPoint, @@ -1694,7 +1670,7 @@ describe("Account Recovery Module: ", async () => { accountRecoveryModule, ecdsaModule, controlMessage, - arrayOfSigners + arrayOfSigners, } = await setupTests(); const userOp = await makeUnsignedUserOp( @@ -1715,19 +1691,23 @@ describe("Account Recovery Module: ", async () => { entryPoint, accountRecoveryModule.address ); - - const { chainId } = await entryPoint.provider.getNetwork() - const messageUserOp = arrayify(getUserOpHash(userOp, entryPoint!.address, chainId)); + + const { chainId } = await entryPoint.provider.getNetwork(); + const messageUserOp = arrayify( + getUserOpHash(userOp, entryPoint!.address, chainId) + ); const messageHash = ethers.utils.id(controlMessage); const messageHashBytes = ethers.utils.arrayify(messageHash); - + let signatures = "0x"; - let wrongArrayOfSigners = [charlie, eve, bob]; // eve != alice + const wrongArrayOfSigners = [charlie, eve, bob]; // eve != alice for (let i = 0; i < arrayOfSigners.length; i++) { const sig = await arrayOfSigners[i].signMessage(messageUserOp); - const guardian = await wrongArrayOfSigners[i].signMessage(messageHashBytes); //so the signers for the userOpHash and controlMessage do not match + const guardian = await wrongArrayOfSigners[i].signMessage( + messageHashBytes + ); // so the signers for the userOpHash and controlMessage do not match signatures = signatures + sig.slice(2) + guardian.slice(2); } @@ -1749,12 +1729,8 @@ describe("Account Recovery Module: ", async () => { }); it("Should revert if the signature is for other module", async () => { - const { - entryPoint, - userSA, - accountRecoveryModule, - ecdsaModule, - } = await setupTests(); + const { entryPoint, userSA, accountRecoveryModule, ecdsaModule } = + await setupTests(); const userOp = await makeEcdsaModuleUserOp( "execute", @@ -1773,7 +1749,7 @@ describe("Account Recovery Module: ", async () => { userSA.address, smartAccountOwner, entryPoint, - accountRecoveryModule.address //use account recovery module as validator + accountRecoveryModule.address // use account recovery module as validator ); await expect( @@ -1798,8 +1774,8 @@ describe("Account Recovery Module: ", async () => { "transferOwnership", [newOwner.address], ecdsaModule, - userSA.address, - [charlie, alice, alice], + userSA.address, + [charlie, alice, alice], controlMessage, entryPoint, accountRecoveryModule @@ -1815,38 +1791,36 @@ describe("Account Recovery Module: ", async () => { }); it("Reverts if signatures are not sorted by the ascending signer's address", async () => { - const { - entryPoint, - userSA, - accountRecoveryModule, - ecdsaModule, - controlMessage, - } = await setupTests(); - - const userOp = await makeMultisignedSubmitRecoveryRequestUserOp( - "transferOwnership", - [newOwner.address], - ecdsaModule, - userSA.address, - [alice, bob, charlie], // they are not sorted by ascendance of eth addresses - controlMessage, - entryPoint, - accountRecoveryModule - ); - - await expect( - entryPoint.handleOps([userOp], alice.address, { - gasLimit: 10000000, - }) - ) - .to.be.revertedWith("FailedOp") - .withArgs(0, "AA23 reverted: AccRecovery: NotUnique/BadOrder"); + const { + entryPoint, + userSA, + accountRecoveryModule, + ecdsaModule, + controlMessage, + } = await setupTests(); + + const userOp = await makeMultisignedSubmitRecoveryRequestUserOp( + "transferOwnership", + [newOwner.address], + ecdsaModule, + userSA.address, + [alice, bob, charlie], // they are not sorted by ascendance of eth addresses + controlMessage, + entryPoint, + accountRecoveryModule + ); + + await expect( + entryPoint.handleOps([userOp], alice.address, { + gasLimit: 10000000, + }) + ) + .to.be.revertedWith("FailedOp") + .withArgs(0, "AA23 reverted: AccRecovery: NotUnique/BadOrder"); }); }); - describe("Execution stage", async () => { - it("Can change from one validation module to another (by enabling and setting it up) when making recovery", async () => { const { entryPoint, @@ -1855,31 +1829,27 @@ describe("Account Recovery Module: ", async () => { ecdsaModule, controlMessage, arrayOfSigners, - defaultSecurityDelay + defaultSecurityDelay, } = await setupTests(); const mockValidationModule = await ( await ethers.getContractFactory("MockAuthModule") - ).deploy(); + ).deploy(); const executeBatchParams = [ [ecdsaModule.address, userSA.address], [ethers.utils.parseEther("0"), ethers.utils.parseEther("0")], [ - ecdsaModule.interface.encodeFunctionData( - "renounceOwnership", - [] - ), - userSA.interface.encodeFunctionData( - "setupAndEnableModule", - [ - mockValidationModule.address, - mockValidationModule.interface.encodeFunctionData("init", [0xdecaf]) - ] - ), + ecdsaModule.interface.encodeFunctionData("renounceOwnership", []), + userSA.interface.encodeFunctionData("setupAndEnableModule", [ + mockValidationModule.address, + mockValidationModule.interface.encodeFunctionData("init", [ + 0xdecaf, + ]), + ]), ], - ] - + ]; + const recoveryRequestCallData = userSA.interface.encodeFunctionData( "executeBatch", executeBatchParams @@ -1890,18 +1860,21 @@ describe("Account Recovery Module: ", async () => { [ accountRecoveryModule.address, ethers.utils.parseEther("0"), - accountRecoveryModule.interface.encodeFunctionData("submitRecoveryRequest", [ - recoveryRequestCallData, - ]), + accountRecoveryModule.interface.encodeFunctionData( + "submitRecoveryRequest", + [recoveryRequestCallData] + ), ], userSA.address, arrayOfSigners, controlMessage, entryPoint, - accountRecoveryModule.address, + accountRecoveryModule.address ); - await entryPoint.handleOps([addRequestUserOp], alice.address, { gasLimit: 10000000 }); + await entryPoint.handleOps([addRequestUserOp], alice.address, { + gasLimit: 10000000, + }); const executeRecoveryRequestUserOp = await makeUnsignedUserOp( "executeBatch", @@ -1916,9 +1889,15 @@ describe("Account Recovery Module: ", async () => { ]); await ethers.provider.send("evm_mine", []); - const executeRequestTxn = await entryPoint.handleOps([executeRecoveryRequestUserOp], alice.address, { gasLimit: 10000000 }); + const executeRequestTxn = await entryPoint.handleOps( + [executeRecoveryRequestUserOp], + alice.address, + { gasLimit: 10000000 } + ); expect(executeRequestTxn).to.emit(ecdsaModule, "OwnershipTransferred"); - expect(await userSA.isModuleEnabled(mockValidationModule.address)).to.equal(true); + expect( + await userSA.isModuleEnabled(mockValidationModule.address) + ).to.equal(true); }); it("The request with invalid calldata for the module executes but does nothing", async () => { @@ -1929,7 +1908,7 @@ describe("Account Recovery Module: ", async () => { ecdsaModule, controlMessage, arrayOfSigners, - defaultSecurityDelay + defaultSecurityDelay, } = await setupTests(); const invalidCallData = "0xdecafdecaf"; @@ -1939,7 +1918,7 @@ describe("Account Recovery Module: ", async () => { ethers.utils.parseEther("0"), invalidCallData, ]; - + const recoveryRequestCallData = userSA.interface.encodeFunctionData( "execute", invalidArgs @@ -1950,18 +1929,21 @@ describe("Account Recovery Module: ", async () => { [ accountRecoveryModule.address, ethers.utils.parseEther("0"), - accountRecoveryModule.interface.encodeFunctionData("submitRecoveryRequest", [ - recoveryRequestCallData, - ]), + accountRecoveryModule.interface.encodeFunctionData( + "submitRecoveryRequest", + [recoveryRequestCallData] + ), ], userSA.address, arrayOfSigners, controlMessage, entryPoint, - accountRecoveryModule.address, + accountRecoveryModule.address ); - await entryPoint.handleOps([addRequestUserOp], alice.address, { gasLimit: 10000000 }); + await entryPoint.handleOps([addRequestUserOp], alice.address, { + gasLimit: 10000000, + }); const executeRecoveryRequestUserOp = await makeUnsignedUserOp( "execute", @@ -1976,8 +1958,14 @@ describe("Account Recovery Module: ", async () => { ]); await ethers.provider.send("evm_mine", []); - await entryPoint.handleOps([executeRecoveryRequestUserOp], alice.address, { gasLimit: 10000000 }); - expect(await ecdsaModule.getOwner(userSA.address)).to.equal(smartAccountOwner.address); + await entryPoint.handleOps( + [executeRecoveryRequestUserOp], + alice.address, + { gasLimit: 10000000 } + ); + expect(await ecdsaModule.getOwner(userSA.address)).to.equal( + smartAccountOwner.address + ); }); it("Executing request with completely invalid calldata reverts", async () => { @@ -1989,9 +1977,9 @@ describe("Account Recovery Module: ", async () => { controlMessage, arrayOfSigners, defaultSecurityDelay, - chainId + chainId, } = await setupTests(); - + const recoveryRequestCallData = "0xdecafdecaf"; const addRequestUserOp = await makeMultiSignedUserOpWithGuardiansList( @@ -1999,19 +1987,22 @@ describe("Account Recovery Module: ", async () => { [ accountRecoveryModule.address, ethers.utils.parseEther("0"), - accountRecoveryModule.interface.encodeFunctionData("submitRecoveryRequest", [ - recoveryRequestCallData, - ]), + accountRecoveryModule.interface.encodeFunctionData( + "submitRecoveryRequest", + [recoveryRequestCallData] + ), ], userSA.address, arrayOfSigners, controlMessage, entryPoint, - accountRecoveryModule.address, + accountRecoveryModule.address ); - await entryPoint.handleOps([addRequestUserOp], alice.address, { gasLimit: 10000000 }); - + await entryPoint.handleOps([addRequestUserOp], alice.address, { + gasLimit: 10000000, + }); + const executeRecoveryRequestUserOp = await fillUserOp( { sender: userSA.address, @@ -2020,12 +2011,12 @@ describe("Account Recovery Module: ", async () => { entryPoint, "nonce" ); - + const signatureWithModuleAddress = ethers.utils.defaultAbiCoder.encode( ["bytes", "address"], [0x0, accountRecoveryModule.address] ); - + executeRecoveryRequestUserOp.signature = signatureWithModuleAddress; await ethers.provider.send("evm_increaseTime", [ @@ -2035,31 +2026,49 @@ describe("Account Recovery Module: ", async () => { const errorData = ethers.utils.hexConcat([ ethers.utils.id("NonExistingMethodCalled(bytes4)").slice(0, 10), - recoveryRequestCallData.slice(0,10), - ethers.utils.hexZeroPad("0x", 28), //add zeros + recoveryRequestCallData.slice(0, 10), + ethers.utils.hexZeroPad("0x", 28), // add zeros ]); - const txn = await entryPoint.handleOps([executeRecoveryRequestUserOp], alice.address, { gasLimit: 10000000 }); - expect(await txn).to.emit(entryPoint, "UserOperationRevertReason") - .withArgs( - getUserOpHash(executeRecoveryRequestUserOp, entryPoint.address, chainId), - executeRecoveryRequestUserOp.sender, - executeRecoveryRequestUserOp.nonce, - errorData + const txn = await entryPoint.handleOps( + [executeRecoveryRequestUserOp], + alice.address, + { gasLimit: 10000000 } + ); + expect(await txn) + .to.emit(entryPoint, "UserOperationRevertReason") + .withArgs( + getUserOpHash( + executeRecoveryRequestUserOp, + entryPoint.address, + chainId + ), + executeRecoveryRequestUserOp.sender, + executeRecoveryRequestUserOp.nonce, + errorData + ); + expect(await ecdsaModule.getOwner(userSA.address)).to.equal( + smartAccountOwner.address ); - expect(await ecdsaModule.getOwner(userSA.address)).to.equal(smartAccountOwner.address); }); }); describe("addGuardian", async () => { it("Can add a guardian and proper event is emitted", async () => { - const { entryPoint, userSA, accountRecoveryModule, ecdsaModule, controlMessage } = - await setupTests(); + const { + entryPoint, + userSA, + accountRecoveryModule, + ecdsaModule, + controlMessage, + } = await setupTests(); const messageHash = ethers.utils.id(controlMessage); const messageHashBytes = ethers.utils.arrayify(messageHash); - - const newGuardian = ethers.utils.keccak256(await eve.signMessage(messageHashBytes)); + + const newGuardian = ethers.utils.keccak256( + await eve.signMessage(messageHashBytes) + ); const guardiansBefore = ( await accountRecoveryModule.getSmartAccountSettings(userSA.address) @@ -2103,11 +2112,9 @@ describe("Account Recovery Module: ", async () => { validAfter: receiptTimestamp + userSASettings.securityDelay, }; - expect(handleOpsTxn).to.emit(accountRecoveryModule, "GuardianAdded").withArgs( - userSA.address, - newGuardian, - expectedTimeFrame - ); + expect(handleOpsTxn) + .to.emit(accountRecoveryModule, "GuardianAdded") + .withArgs(userSA.address, newGuardian, expectedTimeFrame); const eveTimeFrame = await accountRecoveryModule.getGuardianParams( newGuardian, diff --git a/test/utils/accountRecovery.ts b/test/utils/accountRecovery.ts index c4f8561f..abd204cc 100644 --- a/test/utils/accountRecovery.ts +++ b/test/utils/accountRecovery.ts @@ -48,7 +48,9 @@ export async function makeMultiSignedUserOpWithGuardiansList( ); const chainId = await provider!.getNetwork().then((net) => net.chainId); - const messageUserOp = arrayify(getUserOpHash(op2, entryPoint!.address, chainId)); + const messageUserOp = arrayify( + getUserOpHash(op2, entryPoint!.address, chainId) + ); const messageHash = ethers.utils.id(controlMessage); const messageHashBytes = ethers.utils.arrayify(messageHash);