Support Solana Token-2022 program #36699
Labels
feature/web3/wallet/core
feature/web3/wallet/solana
feature/web3/wallet
Integrating Ethereum+ wallet support
OS/Android
Fixes related to Android browser functionality
OS/Desktop
priority/P3
The next thing for us to work on. It'll ride the trains.
QA Pass - Android ARM
QA Pass-Win64
QA/Yes
release-notes/include
Milestone
https://spl.solana.com/token-2022
We need
BlockchainToken
(token program or token-2022 program)"tags":["community","token-2022"]
appears in fetched JupiterTokensList Set Solana token-2022 property token-lists#138BlockchainToken
mojo struct to have an optionalSPLTokenProgram
enum with eitherTokenProgram
orTokenProgram2022
value.TokenProgram
orTokenProgram2022
for SPL tokens during parsing tokens from registrySolanaKeyring::GetAssociatedTokenAccount
needs to takeSPLTokenProgram
enum as a parameter to use the right token program ID.Transfer
toTransferChecked
becauseTransfer
is deprecated.MakeTokenProgramTransferTxData
, use the correct token program ID throughout the process.DiscoverSPLTokensFromRegistry
) andGetSPLTokenBalances
GetSolanaTokenAccountsByOwner
to also query token2022 program ID.Obsolete items just for reference:
- Adding custom token manuallyJust wait until balance fetching or transfer to update it.- When adding custom SPL tokens, in the backend we need to make a network call to fetch the program owner (token program or token program 2022) before adding it (store in
BlockchainToken
struct) if it's still unknown.- Migration on existing user assets (SPL tokens only), use network call to update their token programRetrieve account owner (which token program) when token is used.The text was updated successfully, but these errors were encountered: