Skip to content

Commit

Permalink
Merge ae8f915 into 07e6f34
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcosNicolau authored Sep 24, 2024
2 parents 07e6f34 + ae8f915 commit d8d846c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.

Large diffs are not rendered by default.

18 changes: 8 additions & 10 deletions contracts/src/core/BatcherPaymentService.sol
Original file line number Diff line number Diff line change
Expand Up @@ -282,21 +282,19 @@ contract BatcherPaymentService is
revert InvalidMaxFee(signatureData.maxFee, feePerProof);
}

bytes32 structHash = keccak256(abi.encode(
noncedVerificationDataTypeHash,
leaf,
signatureData.nonce,
signatureData.maxFee
));
bytes32 structHash = keccak256(
abi.encode(
noncedVerificationDataTypeHash,
leaf,
signatureData.nonce,
signatureData.maxFee
)
);

bytes32 hash = _hashTypedDataV4(structHash);

address signer = ECDSA.recover(hash, signatureData.signature);

if (signer == address(0)) {
revert InvalidSignature();
}

UserInfo storage signerData = userData[signer];

if (signerData.nonce != signatureData.nonce) {
Expand Down

0 comments on commit d8d846c

Please sign in to comment.