Skip to content

Commit fe78b82

Browse files
committed
fix: update
1 parent 3a4bf13 commit fe78b82

1 file changed

Lines changed: 17 additions & 1 deletion

File tree

cli/src/interceptor_handler.rs

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -519,6 +519,22 @@ impl StakeDepositInterceptorCliHandler {
519519
)),
520520
}?;
521521

522+
// Authorize the deposit stake account's staker and withdrawer to the stake deposit authority
523+
let authorize_staker_ix = solana_stake_interface::instruction::authorize(
524+
&stake,
525+
&self.cli_config.signer.pubkey(),
526+
&stake_deposit_authority_address,
527+
solana_stake_interface::state::StakeAuthorize::Staker,
528+
None,
529+
);
530+
let authorize_withdrawer_ix = solana_stake_interface::instruction::authorize(
531+
&stake,
532+
&self.cli_config.signer.pubkey(),
533+
&stake_deposit_authority_address,
534+
solana_stake_interface::state::StakeAuthorize::Withdrawer,
535+
None,
536+
);
537+
522538
// Check if this vote account has staking account in the pool
523539
let validator_list = get_validator_list(&rpc_client, &stake_pool.validator_list).await?;
524540

@@ -594,7 +610,7 @@ impl StakeDepositInterceptorCliHandler {
594610
log::info!("Depositing Stake parameters: {ix_builder:?}",);
595611

596612
self.process_transaction(
597-
&[ix],
613+
&[authorize_staker_ix, authorize_withdrawer_ix, ix],
598614
&self.cli_config.signer.pubkey(),
599615
&[
600616
self.cli_config.signer.clone(),

0 commit comments

Comments
 (0)