From 93517e754023d3e053326719f673c02ff2f332e9 Mon Sep 17 00:00:00 2001 From: owen05 Date: Sat, 18 Sep 2021 15:54:07 +0800 Subject: [PATCH] fix --- contracts/NFTPool/impl/FilterERC1155V1.sol | 4 ++-- contracts/NFTPool/impl/FilterERC721V1.sol | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/contracts/NFTPool/impl/FilterERC1155V1.sol b/contracts/NFTPool/impl/FilterERC1155V1.sol index 113ec85..10da091 100644 --- a/contracts/NFTPool/impl/FilterERC1155V1.sol +++ b/contracts/NFTPool/impl/FilterERC1155V1.sol @@ -84,7 +84,7 @@ contract FilterERC1155V1 is IERC1155Receiver, BaseFilterV1 { emit TargetOut(tokenIds[i], amounts[i]); } (uint256 rawPay, ) = queryNFTTargetOut(totalAmount); - paid = IFilterAdmin(_OWNER_).burnFragFrom(msg.sender, rawPay); + paid = IFilterAdmin(_OWNER_).burnFragFrom(to, rawPay); } function ERC1155RandomOut(uint256 amount, address to) @@ -93,7 +93,7 @@ contract FilterERC1155V1 is IERC1155Receiver, BaseFilterV1 { returns (uint256 paid) { (uint256 rawPay, ) = queryNFTRandomOut(amount); - paid = IFilterAdmin(_OWNER_).burnFragFrom(msg.sender, rawPay); + paid = IFilterAdmin(_OWNER_).burnFragFrom(to, rawPay); for (uint256 i = 0; i < amount; i++) { uint256 randomNum = _getRandomNum() % _TOTAL_NFT_AMOUNT_; uint256 sum; diff --git a/contracts/NFTPool/impl/FilterERC721V1.sol b/contracts/NFTPool/impl/FilterERC721V1.sol index 5e9cbe5..7058f3c 100644 --- a/contracts/NFTPool/impl/FilterERC721V1.sol +++ b/contracts/NFTPool/impl/FilterERC721V1.sol @@ -87,7 +87,7 @@ contract FilterERC721V1 is IERC721Receiver, BaseFilterV1 { returns (uint256 paid) { (uint256 rawPay, ) = queryNFTTargetOut(tokenIds.length); - paid = IFilterAdmin(_OWNER_).burnFragFrom(msg.sender, rawPay); + paid = IFilterAdmin(_OWNER_).burnFragFrom(to, rawPay); for (uint256 i = 0; i < tokenIds.length; i++) { _transferOutERC721(to, tokenIds[i]); @@ -102,7 +102,7 @@ contract FilterERC721V1 is IERC721Receiver, BaseFilterV1 { returns (uint256 paid) { (uint256 rawPay, ) = queryNFTRandomOut(amount); - paid = IFilterAdmin(_OWNER_).burnFragFrom(msg.sender, rawPay); + paid = IFilterAdmin(_OWNER_).burnFragFrom(to, rawPay); for (uint256 i = 0; i < amount; i++) { uint256 index = _getRandomNum() % _TOTAL_NFT_AMOUNT_; _transferOutERC721(to, _NFT_IDS_[index]);