Skip to content

Commit

Permalink
Fix token 2022 account length
Browse files Browse the repository at this point in the history
`ExtensionType::get_account_len` has been made fallible in solana-labs/solana-program-library#4646 and renamed to `ExtensionType::try_calculate_account_len` in solana-labs/solana-program-library#4661
  • Loading branch information
acheroncrypto committed Oct 11, 2023
1 parent 055d2ee commit 838b828
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lang/syn/src/codegen/accounts/constraints.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1118,7 +1118,7 @@ fn generate_get_token_account_space(mint: &Expr) -> proc_macro2::TokenStream {
let mint_state = StateWithExtensions::<Mint>::unpack(&mint_data)?;
let mint_extensions = mint_state.get_extension_types()?;
let required_extensions = ExtensionType::get_required_init_account_extensions(&mint_extensions);
ExtensionType::get_account_len::<Account>(&required_extensions)
ExtensionType::try_calculate_account_len::<Account>(&required_extensions)?
} else {
::anchor_spl::token::TokenAccount::LEN
}
Expand Down

0 comments on commit 838b828

Please sign in to comment.