Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] NFT DID ownership association is handled incorrectly in some cases #13712

Open
greimela opened this issue Oct 26, 2022 · 1 comment
Open
Assignees
Labels
bug Something isn't working GUI Related to the Chia GUI NFT Wallet

Comments

@greimela
Copy link
Contributor

What happened?

There are some situations where the association of NFTs and DIDs is not handled correctly.

One issue seems to be this code in the wallet:

if new_owner is None:
# If no new owner was specified and we're sending this to ourselves, let's not reset the DID
derivation_record: Optional[
DerivationRecord
] = await self.wallet_state_manager.puzzle_store.get_derivation_record_for_puzzle_hash(
payments[0].puzzle_hash
)
if derivation_record is not None:
new_owner = unft.owner_did
magic_condition = Program.to([-10, new_owner, trade_prices_list, new_did_inner_hash])

It decides to keep the previous DID in the metadata if I transfer the NFT to one of my own addresses. However, in case I received that NFT directly on mint, by being the target_address, I actually don't own the currently attached DID.

The NFT ownership layer itself also has a condition where it only requires a DID announcement if I want to change the DID. But I can theoretically keep the minter DID attached forever, if I wanted to...

And since it's the wallet deciding whether it wants to keep the DID in the NFT, there could be one wallet in the ecosystem that handles it differently.

So I basically can't trust any DID assignment as soon as a change of the p2_puzhash occurs, e.g. when cancelling an offer on chain.
But the Chia wallet will still show it as being attached to my DID.

Version

1.6.0

What platform are you using?

macOS

What ui mode are you using?

GUI

Relevant log output

No response

@greimela greimela added the bug Something isn't working label Oct 26, 2022
@ytx1991 ytx1991 closed this as completed Jan 27, 2023
@BrandtH22
Copy link
Contributor

@ytx1991
Can we reopen this issue??
There is still a discrepancy based on the owner DID.

The Owner DID is not properly removed when performing a transfer to an xch address.
This causes issues in the chia client when a project mints NFTs that have target addresses.

  • The chia client identifies the owner DID of the minting project (since it has not been removed during transfer)
  • The client then errors as it tries to identify the keyset associated with the DID (which it will not be able to since it is another users keyset)
  • Users are becoming confused with these extra DIDs and NFT wallets appearing the client
  • Marketplaces/explorers have established a workaround to only show a DID owner if the most recent activity is moving the NFT to a profile
  • This workaround leads marketplaces/explorers to incorrectly display NFT DIDs (for instance NFTs minted with DIDs and without target addresses must be shown as having the xch address as the owner because the onchain records are identical to if the minting transaction has targets)
  • This workaround creates extra work for minters as when they are showing off their project they now need to manually move the NFTs to the profile for marketplaces/explorers to recognize the correct owner DID (GUI client does not allow move to profile as it is already associated with the profile)

Also, a result of this issue has been reported under issue #14748

@trepca trepca reopened this Apr 4, 2023
@emlowe emlowe assigned geoffwalmsley and unassigned trepca and ytx1991 Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working GUI Related to the Chia GUI NFT Wallet
Projects
None yet
Development

No branches or pull requests

7 participants