closes #9
This commit is contained in:
parent
aec3c4d77e
commit
01ca6aaf01
|
@ -99,7 +99,10 @@ contract GiftBucket {
|
|||
uint256 amount = gift.amount;
|
||||
require(redeemableSupply >= amount, "not enough redeemable supply");
|
||||
|
||||
gift.recipient = address(0);
|
||||
gift.amount = 0;
|
||||
gift.code = 0;
|
||||
|
||||
redeemableSupply -= amount;
|
||||
|
||||
tokenContract.transfer(_redeem.receiver, amount);
|
||||
|
|
|
@ -69,7 +69,12 @@ contract NFTBucket is IERC165, IERC721Receiver {
|
|||
|
||||
RedeemUtil.validateCode(_redeem, gift.code);
|
||||
|
||||
tokenContract.safeTransferFrom(address(this), _redeem.receiver, gift.tokenID);
|
||||
uint256 tokenID = gift.tokenID;
|
||||
gift.recipient = address(0);
|
||||
gift.tokenID = 0;
|
||||
gift.code = 0;
|
||||
|
||||
tokenContract.safeTransferFrom(address(this), _redeem.receiver, tokenID);
|
||||
}
|
||||
|
||||
function kill() external onlyOwner {
|
||||
|
|
Loading…
Reference in New Issue