Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
kingster-will committed Dec 13, 2024
1 parent c537842 commit dc729e5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
5 changes: 1 addition & 4 deletions contracts/IPAccountImpl.sol
Original file line number Diff line number Diff line change
Expand Up @@ -250,10 +250,7 @@ contract IPAccountImpl is ERC6551, IPAccountStorage, IIPAccount {
}

/// @dev Returns whether the `signature` is valid for the `hash.
function _erc1271IsValidSignature(
bytes32 hash,
bytes calldata signature
) internal view override returns (bool) {
function _erc1271IsValidSignature(bytes32 hash, bytes calldata signature) internal view override returns (bool) {
uint8 v = uint8(signature[64]);
address signer;

Expand Down
6 changes: 4 additions & 2 deletions test/foundry/IPAccountMetaTx.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,6 @@ contract IPAccountMetaTxTest is BaseTest {
assertEq(ipAccount.state(), expectedState);
}


function test_IPAccount_isValidSignature() public {
uint256 tokenId = 100;

Expand Down Expand Up @@ -255,7 +254,10 @@ contract IPAccountMetaTxTest is BaseTest {
(uint8 v, bytes32 r, bytes32 s) = vm.sign(ownerPrivateKey, digest);

bytes memory signature = abi.encodePacked(r, s, v);
assertEq(ERC6551(payable(address(ipAccount))).isValidSignature(digest, signature), ERC1271.isValidSignature.selector);
assertEq(
ERC6551(payable(address(ipAccount))).isValidSignature(digest, signature),
ERC1271.isValidSignature.selector
);
}

function test_IPAccount_setPermissionWithSignatureThenCallAccessControlledModule() public {
Expand Down

0 comments on commit dc729e5

Please sign in to comment.