You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Noticed a mismatched in the expected unit values between the voucher.minPrice and msg.value -
voucher.minPrice is implied to be in ETH - so values like .5, 1, 10 (generally single or double digit) are assumed to be ok.
msg.value is in WEI so require(msg.value >= voucher.minPrice, "Insufficient funds to redeem"); will more or less always be true.
If you attempt to set voucher.minPrice to a value in WEI then this causes an overflow bug in most cases because 1 ETH in WEI will exceed the MAX_SAFE_INTERGER value in javascript.
The text was updated successfully, but these errors were encountered:
Noticed a mismatched in the expected unit values between the voucher.minPrice and msg.value -
voucher.minPrice is implied to be in ETH - so values like .5, 1, 10 (generally single or double digit) are assumed to be ok.
msg.value is in WEI so
require(msg.value >= voucher.minPrice, "Insufficient funds to redeem");
will more or less always be true.If you attempt to set voucher.minPrice to a value in WEI then this causes an overflow bug in most cases because 1 ETH in WEI will exceed the MAX_SAFE_INTERGER value in javascript.
The text was updated successfully, but these errors were encountered: