Skip to content

Commit cf23321

Browse files
add final receiver check
1 parent 98eee5c commit cf23321

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

packages/avatar/contracts/nft-collection/PurchaseWrapper.sol

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ contract PurchaseWrapper is AccessControl, IERC721Receiver, ReentrancyGuard {
139139
bytes calldata signature
140140
) external nonReentrant {
141141
_validateAndAuthorizePurchase(sender, nftCollection, randomTempTokenId);
142+
if (finalReceiver == address(0)) revert PurchaseWrapperInvalidRecipientAddress();
142143

143144
uint256 sandAmount = INFTCollection(nftCollection).waveSingleTokenPrice(waveIndex);
144145

0 commit comments

Comments
 (0)