|
1 | 1 | // SPDX-License-Identifier: GPL-3.0 |
2 | | -pragma solidity ^0.8.23; |
| 2 | +pragma solidity ^0.8.28; |
3 | 3 |
|
4 | 4 | import {ECDSA} from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; |
5 | | -import {MessageHashUtils} from "@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol"; |
6 | 5 | import {SignatureChecker} from "@openzeppelin/contracts/utils/cryptography/SignatureChecker.sol"; |
7 | 6 | import {SIG_VALIDATION_FAILED} from "account-abstraction/core/Helpers.sol"; |
8 | 7 | import {IEntryPoint} from "account-abstraction/interfaces/IEntryPoint.sol"; |
@@ -35,7 +34,6 @@ import {CustomSlotInitializable} from "./common/CustomSlotInitializable.sol"; |
35 | 34 | /// 5. Uses custom errors. |
36 | 35 | contract LightAccount is BaseLightAccount, CustomSlotInitializable { |
37 | 36 | using ECDSA for bytes32; |
38 | | - using MessageHashUtils for bytes32; |
39 | 37 |
|
40 | 38 | /// @dev The version used for namespaced storage is not linked to the release version of the contract. Storage |
41 | 39 | /// versions will be updated only when storage layout changes are made. |
@@ -127,10 +125,7 @@ contract LightAccount is BaseLightAccount, CustomSlotInitializable { |
127 | 125 | } |
128 | 126 | uint8 signatureType = uint8(userOp.signature[0]); |
129 | 127 | if (signatureType == uint8(SignatureType.EOA)) { |
130 | | - // EOA signature |
131 | | - bytes32 signedHash = userOpHash.toEthSignedMessageHash(); |
132 | | - bytes memory signature = userOp.signature[1:]; |
133 | | - return _successToValidationData(_isValidEOAOwnerSignature(signedHash, signature)); |
| 128 | + return _successToValidationData(_isValidEOAOwnerSignature(userOpHash, userOp.signature[1:])); |
134 | 129 | } else if (signatureType == uint8(SignatureType.CONTRACT)) { |
135 | 130 | // Contract signature without address |
136 | 131 | bytes memory signature = userOp.signature[1:]; |
|
0 commit comments