Skip to content

Commit c9518d7

Browse files
refactor: remove 0 check in recovered address in BatcherPaymentService (#1064)
1 parent 9358698 commit c9518d7

File tree

2 files changed

+9
-11
lines changed

2 files changed

+9
-11
lines changed

contracts/scripts/anvil/state/alignedlayer-deployed-anvil-state.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

contracts/src/core/BatcherPaymentService.sol

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -282,21 +282,19 @@ contract BatcherPaymentService is
282282
revert InvalidMaxFee(signatureData.maxFee, feePerProof);
283283
}
284284

285-
bytes32 structHash = keccak256(abi.encode(
286-
noncedVerificationDataTypeHash,
287-
leaf,
288-
signatureData.nonce,
289-
signatureData.maxFee
290-
));
285+
bytes32 structHash = keccak256(
286+
abi.encode(
287+
noncedVerificationDataTypeHash,
288+
leaf,
289+
signatureData.nonce,
290+
signatureData.maxFee
291+
)
292+
);
291293

292294
bytes32 hash = _hashTypedDataV4(structHash);
293295

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

296-
if (signer == address(0)) {
297-
revert InvalidSignature();
298-
}
299-
300298
UserInfo storage signerData = userData[signer];
301299

302300
if (signerData.nonce != signatureData.nonce) {

0 commit comments

Comments
 (0)