core icon indicating copy to clipboard operation
core copied to clipboard

Allow pending NFT sales (FORKING CHANGE)

Open redpartyhat opened this issue 4 years ago • 0 comments

As it stands, users that want to put transferred NFTs up for sale must first "accept" the NFT transfer. This is cumbersome and does not add any obvious utility. This PR removes that restriction, automatically accepting an NFT transfer when it is put up for sale.

In drafting this change, I took inventory of all NFT transactions and noted those that are affected by the "IsPending" status of an NFT. This is the current state of NFT consensus:

Unaffected NFT Transaction:

  • CreateNFT
  • BurnNFT
  • NFTTransfer (one can already transfer a pending NFT)

Affected NFT Transactions:

  • NFTBid -> Can't bid on a pending NFT.
  • AcceptNFTBid -> Can't accept a bid on a pending NFT.
  • UpdateNFT -> You can't update an NFT that is a pending transfer.
  • AcceptNFTTransfer -> Sanity check's that an NFT is not for sale before accepting a transfer. Therefore, if an NFT was for sale and pending, one could not accept it. Since it is unreasonable to create a state where the user cannot accept a transfer, this must be avoided.

Given the current state of consensus, the best solution is to force a user to accept a transfer if they update an NFT. This prevents us from being in a situation where an NFT is for sale and pending while keeping all other logic working as expected.

redpartyhat avatar Oct 22 '21 05:10 redpartyhat