From 00d647ca35ae8f529c14c811cd06ef46457b925b Mon Sep 17 00:00:00 2001 From: hazim-j Date: Fri, 1 Aug 2025 17:46:56 +1000 Subject: [PATCH] Findings 3: rename _refHash to refHash --- src/account/KeystoreAccount.sol | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/account/KeystoreAccount.sol b/src/account/KeystoreAccount.sol index 2b21900..7b53d1d 100644 --- a/src/account/KeystoreAccount.sol +++ b/src/account/KeystoreAccount.sol @@ -13,7 +13,7 @@ import {ERC1271} from "../lib/ERC1271.sol"; import {KeystoreUserOperation} from "../lib/KeystoreUserOperation.sol"; contract KeystoreAccount is BaseAccount, ERC1271, Initializable { - bytes32 public _refHash; + bytes32 public refHash; IEntryPoint private immutable _entryPoint; IKeystore private immutable _keystore; @@ -39,8 +39,8 @@ contract KeystoreAccount is BaseAccount, ERC1271, Initializable { } function initialize(bytes32 aRefHash) public virtual initializer { - _refHash = aRefHash; - emit KeystoreAccountInitialized(_entryPoint, _keystore, _refHash); + refHash = aRefHash; + emit KeystoreAccountInitialized(_entryPoint, _keystore, refHash); } function _validateSignature(PackedUserOperation calldata userOp, bytes32 userOpHash) @@ -49,9 +49,9 @@ contract KeystoreAccount is BaseAccount, ERC1271, Initializable { override returns (uint256 validationData) { - ValidateAction memory action = KeystoreUserOperation.prepareValidateAction(userOp, userOpHash, _refHash); + ValidateAction memory action = KeystoreUserOperation.prepareValidateAction(userOp, userOpHash, refHash); if (action.proof.length != 0) { - IKeystore(_keystore).registerNode(_refHash, abi.decode(action.proof, (bytes32[])), action.node); + IKeystore(_keystore).registerNode(refHash, abi.decode(action.proof, (bytes32[])), action.node); action.proof = ""; action.node = abi.encode(keccak256(action.node)); } @@ -68,7 +68,7 @@ contract KeystoreAccount is BaseAccount, ERC1271, Initializable { { (bytes memory proof, bytes memory node, bytes memory data) = abi.decode(signature, (bytes, bytes, bytes)); ValidateAction memory action = - ValidateAction({refHash: _refHash, message: hash, proof: proof, node: node, data: data}); + ValidateAction({refHash: refHash, message: hash, proof: proof, node: node, data: data}); if (IKeystore(_keystore).validate(action) == SIG_VALIDATION_FAILED) { return ERC1271_INVALID_VALUE; }