Skip to content

Commit

Permalink
[Q-2] Redundant check for msg.value < tokenAmount
Browse files Browse the repository at this point in the history
  • Loading branch information
kumaryash90 committed Sep 4, 2024
1 parent 1ddba50 commit d5dc53e
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/PayGatewayModule.sol
Original file line number Diff line number Diff line change
Expand Up @@ -199,12 +199,6 @@ contract PayGatewayModule is EIP712, ModularModule, ReentrancyGuard {
revert PayGatewayVerificationFailed();
}

if (_isTokenNative(req.tokenAddress)) {
if (msg.value < req.tokenAmount) {
revert PayGatewayMismatchedValue(req.tokenAmount, msg.value);
}
}

// mark the pay request as processed
PayGatewayModuleStorage.data().processed[req.transactionId] = true;

Expand Down

0 comments on commit d5dc53e

Please sign in to comment.