You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to create a PDA account and the process is successful, but get an error when to deserialize account data.
I have checked the Remaining account and the Deserializes account, and both of them pubkey is equal.
The error is helpful in this case because you're trying to convert an AccountInfo to a typed account, but the discriminator of the account hasn't yet been set. You can fix this by either writing the discriminator to the account data after the create_account call, or by using Account::try_from_unchecked instead of Account::try_from.
I want to create a PDA account and the process is successful, but get an error when to deserialize account data.
I have checked the Remaining account and the Deserializes account, and both of them pubkey is equal.
Account defines:
Code:
when program execute at
let mut warrior_cards_usage: Account<WarriorCardsUsage> = Account::try_from(warrior_card_usage_ai)?; // problem is here
log:
The text was updated successfully, but these errors were encountered: