Skip to content

Commit

Permalink
stake-pool-cli: Use old ATA creation instruction (solana-labs#2819)
Browse files Browse the repository at this point in the history
  • Loading branch information
joncinque committed Jan 27, 2022
1 parent 76b59b6 commit c781067
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions stake-pool/cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@ use {
system_instruction,
transaction::Transaction,
},
spl_associated_token_account::{
get_associated_token_address, instruction::create_associated_token_account,
},
spl_associated_token_account::get_associated_token_address,
spl_stake_pool::state::ValidatorStakeInfo,
spl_stake_pool::{
self, find_stake_program_address, find_transient_stake_program_address,
Expand All @@ -52,6 +50,9 @@ use {
std::cmp::Ordering,
std::{process::exit, sync::Arc},
};
// use instruction::create_associated_token_account once ATA 1.0.5 is released
#[allow(deprecated)]
use spl_associated_token_account::create_associated_token_account;

pub(crate) struct Config {
rpc_client: RpcClient,
Expand Down Expand Up @@ -637,11 +638,11 @@ fn add_associated_token_account(
.get_minimum_balance_for_rent_exemption(spl_token::state::Account::LEN)
.unwrap();

#[allow(deprecated)]
instructions.push(create_associated_token_account(
&config.fee_payer.pubkey(),
owner,
mint,
&spl_token::id(),
));

*rent_free_balances += min_account_balance;
Expand Down

0 comments on commit c781067

Please sign in to comment.