This repository was archived by the owner on Mar 11, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -2876,15 +2876,19 @@ async fn command_configure_confidential_transfer_account(
2876
2876
// Reallocation (if needed)
2877
2877
let mut existing_extensions: Vec < ExtensionType > = state_with_extension. get_extension_types ( ) ?;
2878
2878
if !existing_extensions. contains ( & ExtensionType :: ConfidentialTransferAccount ) {
2879
- existing_extensions. push ( ExtensionType :: ConfidentialTransferAccount ) ;
2879
+ let mut extra_extensions = vec ! [ ExtensionType :: ConfidentialTransferAccount ] ;
2880
+ if existing_extensions. contains ( & ExtensionType :: TransferFeeAmount ) {
2881
+ extra_extensions. push ( ExtensionType :: ConfidentialTransferFeeAmount ) ;
2882
+ }
2883
+ existing_extensions. extend_from_slice ( & extra_extensions) ;
2880
2884
let needed_account_len =
2881
2885
ExtensionType :: try_calculate_account_len :: < Account > ( & existing_extensions) ?;
2882
2886
if needed_account_len > current_account_len {
2883
2887
token
2884
2888
. reallocate (
2885
2889
& token_account_address,
2886
2890
& owner,
2887
- & [ ExtensionType :: ConfidentialTransferAccount ] ,
2891
+ & extra_extensions ,
2888
2892
& bulk_signers,
2889
2893
)
2890
2894
. await ?;
You can’t perform that action at this time.
0 commit comments