File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -181,7 +181,6 @@ contract ERC2771Forwarder is EIP712, Nonces {
181181 refundValue += requests[i].value;
182182 }
183183 }
184- if (atomic && refundValue > 0 ) revert ERC2771ForwarderFailureInAtomicBatch ();
185184
186185 // The batch should revert if there's a mismatched msg.value provided
187186 // to avoid request value tampering
@@ -192,6 +191,8 @@ contract ERC2771Forwarder is EIP712, Nonces {
192191 // Some requests with value were invalid (possibly due to frontrunning).
193192 // To avoid leaving ETH in the contract this value is refunded.
194193 if (refundValue != 0 ) {
194+ if (atomic) revert ERC2771ForwarderFailureInAtomicBatch ();
195+
195196 // We know refundReceiver != address(0) && requestsValue == msg.value
196197 // meaning we can ensure refundValue is not taken from the original contract's balance
197198 // and refundReceiver is a known account.
You can’t perform that action at this time.
0 commit comments