From 55dd038e13fbcc28bffd657d613645fcd639fd9e Mon Sep 17 00:00:00 2001 From: Filipp Makarov Date: Thu, 21 Sep 2023 10:22:31 +0300 Subject: [PATCH] cleanup --- .../smart-account/modules/BatchedSessionRouterModule.sol | 3 --- test/module/BatchedSessionRouter.Module.specs.ts | 9 +-------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/contracts/smart-account/modules/BatchedSessionRouterModule.sol b/contracts/smart-account/modules/BatchedSessionRouterModule.sol index f8dcab1b..cfbe5d51 100644 --- a/contracts/smart-account/modules/BatchedSessionRouterModule.sol +++ b/contracts/smart-account/modules/BatchedSessionRouterModule.sol @@ -85,9 +85,6 @@ contract BatchedSessionRouter is BaseAuthorizationModule { uint256 length = sessionData.length; require(length == destinations.length, "Lengths mismatch"); - // TODO: since we do not sign SessionDatas[] , can it somehow be messed with? - // like provide it in the wrong order. => should not work as it will be verified along with the calldata - // iterate over batched operations for (uint256 i; i < length; ) { // validate the sessionKey diff --git a/test/module/BatchedSessionRouter.Module.specs.ts b/test/module/BatchedSessionRouter.Module.specs.ts index fa011d2f..9d9a9c76 100644 --- a/test/module/BatchedSessionRouter.Module.specs.ts +++ b/test/module/BatchedSessionRouter.Module.specs.ts @@ -1,4 +1,4 @@ -import { expect, use } from "chai"; +import { expect } from "chai"; import { enableNewTreeForSmartAccountViaEcdsa, getERC20SessionKeyParams, @@ -458,10 +458,7 @@ describe("SessionKey: Batched Session Router", async () => { merkleTree, sessionRouter, mockProtocol, - mockProtocolSVM, mockToken, - sessionKeyData2, - leafData2, } = await setupTests(); const tokenAmountToTransfer = ethers.utils.parseEther("1.7534"); @@ -801,7 +798,6 @@ describe("SessionKey: Batched Session Router", async () => { entryPoint, userSA, sessionKeyManager, - erc20SessionModule, sessionKeyData, leafData, merkleTree, @@ -811,7 +807,6 @@ describe("SessionKey: Batched Session Router", async () => { mockToken, sessionKeyData2, leafData2, - validUntilForMockProtocol, } = await setupTests(); const tokenAmountToTransfer = ethers.utils.parseEther("1.7534"); @@ -876,7 +871,6 @@ describe("SessionKey: Batched Session Router", async () => { userSA, sessionKeyManager, erc20SessionModule, - sessionKeyData, leafData, merkleTree, sessionRouter, @@ -885,7 +879,6 @@ describe("SessionKey: Batched Session Router", async () => { mockToken, sessionKeyData2, leafData2, - validUntilForMockProtocol, } = await setupTests(); const tokenAmountToTransfer = ethers.utils.parseEther("1.7534");