We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b098a69 commit 1e129e3Copy full SHA for 1e129e3
programs/drift/src/instructions/constraints.rs
@@ -161,7 +161,10 @@ pub fn get_vault_len(mint: &InterfaceAccount<Mint>) -> anchor_lang::Result<usize
161
Ok(extensions) => extensions,
162
// If we cant deserialize the mint, we use the default token account length
163
// Init token will fail if this size doesnt work, so worst case init account just fails
164
- Err(_) => return Ok(::anchor_spl::token::TokenAccount::LEN),
+ Err(_) => {
165
+ msg!("Failed to deserialize mint. Falling back to default token account length");
166
+ return Ok(::anchor_spl::token::TokenAccount::LEN);
167
+ }
168
};
169
let required_extensions =
170
ExtensionType::get_required_init_account_extensions(&mint_extensions);
0 commit comments