transferFrom so there's a transfer event
This commit is contained in:
parent
4d66247dd3
commit
be76f716b1
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue