Skip to content

Commit

Permalink
fix: signature verification in extension
Browse files Browse the repository at this point in the history
  • Loading branch information
skimaharvey committed Oct 9, 2023
1 parent cfadcf8 commit 2821ffa
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions contracts/LSP17Extensions/Extension4337.sol
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ import {LSP6Utils} from "../LSP6KeyManager/LSP6Utils.sol";
import {
UserOperation
} from "@account-abstraction/contracts/interfaces/UserOperation.sol";
import {
_LSP20_VERIFY_CALL_RESULT_MAGIC_VALUE
} from "../LSP20CallVerification/LSP20Constants.sol";

contract Extension4337 is LSP17Extension, IAccount {
using ECDSA for bytes32;
Expand Down Expand Up @@ -87,8 +84,11 @@ contract Extension4337 is LSP17Extension, IAccount {
receivedCalldata: userOp.callData
});

// if the call verifier returns a different magic value than _LSP20_VERIFY_CALL_RESULT_MAGIC_VALUE, return signature validation failed
if (_LSP20_VERIFY_CALL_RESULT_MAGIC_VALUE != magicValue) {
// if the call verifier returns a different magic value, return signature validation failed
if (
bytes3(magicValue) !=
bytes3(ILSP20CallVerifier.lsp20VerifyCall.selector)
) {
return _SIG_VALIDATION_FAILED;
}

Expand Down

0 comments on commit 2821ffa

Please sign in to comment.