Skip to content

Commit

Permalink
stake-pool-cli: Fix funding authority flag name (solana-labs#2500)
Browse files Browse the repository at this point in the history
  • Loading branch information
joncinque authored Oct 12, 2021
1 parent 3cf1233 commit b8cc6fa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
2 changes: 1 addition & 1 deletion stake-pool/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ homepage = "https://spl.solana.com/stake-pool"
license = "Apache-2.0"
name = "spl-stake-pool-cli"
repository = "https://github.com/solana-labs/solana-program-library"
version = "0.6.1"
version = "0.6.2"

[dependencies]
borsh = "0.9"
Expand Down
13 changes: 4 additions & 9 deletions stake-pool/cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1493,7 +1493,7 @@ fn command_set_staker(
fn command_set_funding_authority(
config: &Config,
stake_pool_address: &Pubkey,
new_sol_deposit_authority: Option<Pubkey>,
new_authority: Option<Pubkey>,
funding_type: FundingType,
) -> CommandResult {
let mut signers = vec![config.fee_payer.as_ref(), config.manager.as_ref()];
Expand All @@ -1504,7 +1504,7 @@ fn command_set_funding_authority(
&spl_stake_pool::id(),
stake_pool_address,
&config.manager.pubkey(),
new_sol_deposit_authority.as_ref(),
new_authority.as_ref(),
funding_type,
)],
&signers,
Expand Down Expand Up @@ -2540,20 +2540,15 @@ fn main() {
}
("set-funding-authority", Some(arg_matches)) => {
let stake_pool_address = pubkey_of(arg_matches, "pool").unwrap();
let new_stake_deposit_authority = pubkey_of(arg_matches, "new_stake_deposit_authority");
let new_authority = pubkey_of(arg_matches, "new_authority");
let funding_type = match arg_matches.value_of("funding_type").unwrap() {
"sol-deposit" => FundingType::SolDeposit,
"stake-deposit" => FundingType::StakeDeposit,
"sol-withdraw" => FundingType::SolWithdraw,
_ => unreachable!(),
};
let _unset = arg_matches.is_present("unset");
command_set_funding_authority(
&config,
&stake_pool_address,
new_stake_deposit_authority,
funding_type,
)
command_set_funding_authority(&config, &stake_pool_address, new_authority, funding_type)
}
("set-fee", Some(arg_matches)) => {
let stake_pool_address = pubkey_of(arg_matches, "pool").unwrap();
Expand Down

0 comments on commit b8cc6fa

Please sign in to comment.