From b6b5397d3af8d52ffdf027b52ad12c3125fed898 Mon Sep 17 00:00:00 2001 From: jxom Date: Tue, 24 Sep 2024 16:53:39 +1000 Subject: [PATCH] chore: fmt --- contracts/src/P256BatchDelegation.sol | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/contracts/src/P256BatchDelegation.sol b/contracts/src/P256BatchDelegation.sol index adf0d8e..e57d8af 100644 --- a/contracts/src/P256BatchDelegation.sol +++ b/contracts/src/P256BatchDelegation.sol @@ -56,14 +56,11 @@ contract P256BatchDelegation is MultiSendCallOnly { /// @param calls - The calls to execute. /// @param signature - The P256 signature over the calls: `p256.sign(keccak256(nonce ‖ calls))`. /// @param delegateIndex - The index of the delegate public key to use. - function execute( - bytes memory calls, - P256.Signature memory signature, - uint32 delegateIndex - ) public { + function execute(bytes memory calls, P256.Signature memory signature, uint32 delegateIndex) public { bytes32 digest = keccak256(abi.encodePacked(nonce++, calls)); - if (!P256.verify(digest, signature, delegates[delegateIndex])) + if (!P256.verify(digest, signature, delegates[delegateIndex])) { revert InvalidSignature(); + } multiSend(calls); } @@ -79,14 +76,7 @@ contract P256BatchDelegation is MultiSendCallOnly { uint32 delegateIndex ) public { bytes32 challenge = keccak256(abi.encodePacked(nonce++, calls)); - if ( - !WebAuthnP256.verify( - challenge, - metadata, - signature, - delegates[delegateIndex] - ) - ) revert InvalidSignature(); + if (!WebAuthnP256.verify(challenge, metadata, signature, delegates[delegateIndex])) revert InvalidSignature(); multiSend(calls); } }