From 25107105562fcb096c78d7a0adb128ee8fccb8f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Coffee=E2=98=95=EF=B8=8F?= Date: Fri, 13 Dec 2024 12:01:46 -0500 Subject: [PATCH] fix cast --- contracts/validators/SessionKeyValidator.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/validators/SessionKeyValidator.sol b/contracts/validators/SessionKeyValidator.sol index 979c87d..c5a0194 100644 --- a/contracts/validators/SessionKeyValidator.sol +++ b/contracts/validators/SessionKeyValidator.sol @@ -145,7 +145,7 @@ contract SessionKeyValidator is IValidationHook, IModuleValidator, IModule { // Disallow self-targeting transactions with session keys as these have the ability to administer // the smart account. - require(transaction.to != msg.sender, "Can not target self"); + require(address(uint160(transaction.to)) != msg.sender, "Can not target self"); bytes32 sessionHash = keccak256(abi.encode(spec)); sessions[sessionHash].validate(transaction, spec, periodIds);