Skip to content

Commit

Permalink
🎨 linting
Browse files Browse the repository at this point in the history
  • Loading branch information
Filipp Makarov authored and Filipp Makarov committed Jan 15, 2024
1 parent 7b853b9 commit f657505
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions contracts/smart-account/modules/AccountRecoveryModule.sol
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,8 @@ contract AccountRecoveryModule is
uint256 callValue;
bytes calldata innerCallData;
console.log(callData.length);
if (callData.length < 0x64) // 0x64 = 0x4 selector + 0x20 dest + 0x20 value + 0x20 innerCallData.offset
if (callData.length < 0x64)
// 0x64 = 0x4 selector + 0x20 dest + 0x20 value + 0x20 innerCallData.offset
revert("Account Recovery VUO04"); // Validate User Op 02 = wrong callData length
assembly {
dest := calldataload(add(callData.offset, 0x4))
Expand All @@ -173,8 +174,7 @@ contract AccountRecoveryModule is
innerCallData.length := length
}

if (innerCallData.length < 4)
revert("Account Recovery VUO05"); //Validate User Op 05 = innerCallData too short
if (innerCallData.length < 4) revert("Account Recovery VUO05"); //Validate User Op 05 = innerCallData too short
bytes4 innerSelector = bytes4(innerCallData);

bool isTheValidUserOpToAddARecoveryRequest = (innerSelector ==
Expand Down
2 changes: 1 addition & 1 deletion test/module/AccountRecovery.Module.specs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1708,7 +1708,7 @@ describe("Account Recovery Module: ", async () => {

const userOp =
await makeMultiSignedUserOpWithGuardiansListArbitraryCalldata(
userOpCallData.slice(0, 198), //<0x64*2
userOpCallData.slice(0, 198), // <0x64*2
userSA.address,
arrayOfSigners,
controlMessage,
Expand Down

0 comments on commit f657505

Please sign in to comment.