diff --git a/contracts/CurioERC1155Wrapper.sol b/contracts/CurioERC1155Wrapper.sol index 09baedc..5c35639 100644 --- a/contracts/CurioERC1155Wrapper.sol +++ b/contracts/CurioERC1155Wrapper.sol @@ -203,7 +203,9 @@ contract CurioERC1155Wrapper is ERC1155, ERC1155Metadata_URI, ERC1155Metadata, E require(balances[_id][msg.sender] >= _quantity, "insufficient balance"); balances[_id][msg.sender] -= _quantity; - curio.transfer(msg.sender, _quantity); + // do it this way to make sure there's a transfer event + curio.approve(address(this), _quantity); + curio.transferFrom(address(this), msg.sender, _quantity); // burn emit TransferSingle(msg.sender, msg.sender, address(0), _id, _quantity); @@ -228,7 +230,9 @@ contract CurioERC1155Wrapper is ERC1155, ERC1155Metadata_URI, ERC1155Metadata, E require(balances[_id][msg.sender] >= _quantity, "insufficient balance"); balances[_id][msg.sender] -= _quantity; - curio.transfer(msg.sender, _quantity); + // do it this way to make sure there's a transfer event + curio.approve(address(this), _quantity); + curio.transferFrom(address(this), msg.sender, _quantity); } // burn