Skip to content

Commit 51d459e

Browse files
authored
Prevent accidentally locking native tokens in SignatureDrop (#315)
* Prevent possibly locking native tokens * remove duplicate check
1 parent 779afd8 commit 51d459e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

contracts/signature-drop/SignatureDrop.sol

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -251,9 +251,9 @@ contract SignatureDrop is
251251
uint256 platformFees = (totalPrice * platformFeeBps) / MAX_BPS;
252252

253253
if (_currency == CurrencyTransferLib.NATIVE_TOKEN) {
254-
if (msg.value != totalPrice) {
255-
revert("!Price");
256-
}
254+
require(msg.value == totalPrice, "!Price");
255+
} else {
256+
require(msg.value == 0, "!Value");
257257
}
258258

259259
CurrencyTransferLib.transferCurrency(_currency, _msgSender(), platformFeeRecipient, platformFees);

0 commit comments

Comments
 (0)