-
Notifications
You must be signed in to change notification settings - Fork 250
[Bug] walletConnect createOfferForIds Incorrectly identifies CATs as NFTs when using Asset ID #2647
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
Comments
{
"0x0f921c8585d3fea928cab803d050a8b7252705859ba2e0661f15634cec1fd9ab":
{
"type": "cat", # <-- This should be "CAT". (All capital)
"tail": "0x0f921c8585d3fea928cab803d050a8b7252705859ba2e0661f15634cec1fd9ab"
}
} |
I have tried both lowercase and capital CAT neither result in the walletConnect payload being identified as a cat and in all cases except for using the walletID the cat is identified as an NFT. |
I'll further look into this issue as soon as I can. |
Thank you! |
I found the root cause here. When an asset is unknown, it is identified as an NFT in the GUI, which behaves differently from the CLI/RPC. |
What happened?
When sending a create offer for ids request via walletConnect, cats are identified as NFTs rather than as CATs when using the CATs asset id (the standard CLI and RPC commands default to CATs and this behavior is different). This issue persists when the driver dict is added.
Current workaround is to first query the wallet with getWallets to identify the wallet ID associated with the CAT then run the createOfferForIds command using the wallet ID in place of the assetID. If the cat is not yet added to the wallet then one first needs to add it with the walletConnect command chia_addCATToken then run getWallets to get its wallet ID.
An example payload that was used with the example dApp to reproduce the user reported issue:
Offer:
Workaround offer payload using walletID 5 as an example (this will correctly identify the cat at that walletID):
Driver Dict:
Example full payload from user who initially reported the issue:
Issue reported by palvit | DeFi Geeks in discord (https://discord.com/channels/1034523881404370984/1034870571864948777/1358929424522805469)
Version
2.5.3 but also occurs in earlier versions (earliest tested was 2.3.0)
What platform are you using?
Windows
What ui mode are you using?
GUI
Relevant log output or stacktrace
The text was updated successfully, but these errors were encountered: