Skip to content

Commit

Permalink
🚑 SKM check | linting
Browse files Browse the repository at this point in the history
  • Loading branch information
Filipp Makarov authored and Filipp Makarov committed Oct 26, 2023
1 parent 5160791 commit 906d1b6
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ contract BatchedSessionRouter is
bytes memory sessionKeySignature
) = abi.decode(moduleSignature, (address, SessionData[], bytes));

if(!IModuleManager(userOp.sender).isModuleEnabled(sessionKeyManager)) {
revert ("SR Invalid SKM");
if (!IModuleManager(userOp.sender).isModuleEnabled(sessionKeyManager)) {
revert("SR Invalid SKM");
}

address recovered = ECDSA.recover(
Expand Down
2 changes: 1 addition & 1 deletion contracts/smart-account/modules/MultiOwnedECDSAModule.sol
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ contract MultiOwnedECDSAModule is
revert NotAnOwner(owner, msg.sender);
_transferOwnership(msg.sender, owner, address(0));
unchecked {
--numberOfOwners[msg.sender];
--numberOfOwners[msg.sender];
}
}

Expand Down
2 changes: 1 addition & 1 deletion contracts/smart-account/modules/PasskeyRegistryModule.sol
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ contract PasskeyRegistryModule is
PassKeyId storage passKeyId = smartAccountPassKeys[msg.sender];

if (passKeyId.pubKeyX != 0 && passKeyId.pubKeyY != 0)
revert AlreadyInitedForSmartAccount(msg.sender);
revert AlreadyInitedForSmartAccount(msg.sender);

smartAccountPassKeys[msg.sender] = PassKeyId(
_pubKeyX,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,9 @@ describe("SessionKey: Batched Session Router (via Bundler)", async () => {

// create a signature with the sessionKeyManager address
const userOpHash = await entryPoint.getUserOpHash(userOp);
const signatureOverUserOpHash =
await sessionKey.signMessage(ethers.utils.arrayify(userOpHash));
const signatureOverUserOpHash = await sessionKey.signMessage(
ethers.utils.arrayify(userOpHash)
);

const paddedSig = ethers.utils.defaultAbiCoder.encode(
[
Expand Down
8 changes: 2 additions & 6 deletions test/module/BatchedSessionRouter.Module.specs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -864,7 +864,7 @@ describe("SessionKey: Batched Session Router", async () => {
sessionKeyData2,
leafData2,
validUntilForMockProtocol,
erc20SessionModule
erc20SessionModule,
} = await setupTests();
const tokenAmountToTransfer = ethers.utils.parseEther("1.7534");

Expand Down Expand Up @@ -1250,11 +1250,7 @@ describe("SessionKey: Batched Session Router", async () => {
"tuple(uint48,uint48,address,bytes,bytes32[],bytes)[]",
"bytes",
],
[
sessionKeyManager.address,
sessionData,
signatureOverUserOpHash,
]
[sessionKeyManager.address, sessionData, signatureOverUserOpHash]
);

const signatureWithModuleAddress = ethers.utils.defaultAbiCoder.encode(
Expand Down

0 comments on commit 906d1b6

Please sign in to comment.