MarkSackerberg / umi-cmv3-ui-inofficial

https://umi-cmv3-ui-inofficial.vercel.app
55 stars 63 forks source link

fetchAllDigitalAssetWithTokenByOwner can't find some spl-tokens #12

Closed moefreelancer83 closed 3 months ago

moefreelancer83 commented 8 months ago

Hi there, On devnet I was trying to use tokenPayment for the mint and I noticed the a spl-token that is going to be used for payment cannot be found in the user wallet when I fetch the user token through fetchAllDigitalAssetWithTokenByOwner in https://github.com/MarkSackerberg/umi-cmv3-ui-inofficial/blob/1b06bb7ddc64e4146424ab7c2c97449583db113c/utils/checkAllowed.ts#L102

So I needed to go with the approach from https://www.quicknode.com/guides/solana-development/spl-tokens/how-to-get-all-tokens-held-by-a-wallet-in-solana.

MarkSackerberg commented 8 months ago

Hey @moefreelancer83 thanks for the report! What was the token balance? I just tried to reproduce this, but everything seems to be working fine here.

moefreelancer83 commented 8 months ago

Hey @MarkSackerberg , token mint address is i4FQoBW2yxsnyWKCmsZtQw3RsRJt5yax8fEaxjm3k1S and the balance is 19845.999976 And this is the wallet I'm checking the balance for: Bx5ScFKR1nud4DikAeZPueNcWwyvAMPC3C67ypt53fMZ

MarkSackerberg commented 5 months ago

Hey, the UI does find all "digital assets" = tokens with metadata.

Your test token does not seem to have metadata attached. Try again with a token that has metadata please