diff --git a/governance/xc_admin/packages/xc_admin_cli/src/index.ts b/governance/xc_admin/packages/xc_admin_cli/src/index.ts index ae273f0938..1c88be327a 100644 --- a/governance/xc_admin/packages/xc_admin_cli/src/index.ts +++ b/governance/xc_admin/packages/xc_admin_cli/src/index.ts @@ -386,7 +386,7 @@ multisigCommand( "Deactivate the delegated stake from the account" ) .requiredOption( - "-s, --stake-accounts ", + "-s, --stake-accounts ", "stake accounts to be deactivated" ) .action(async (options: any) => { @@ -395,10 +395,15 @@ multisigCommand( const authorizedPubkey: PublicKey = await vault.getVaultAuthorityPDA( cluster ); - const instructions = options.stakeAccounts.reduce( - (instructions: TransactionInstruction[], stakeAccount: string) => { + + const stakeAccounts = options.stakeAccounts + ? options.stakeAccounts.split(",").map((m: string) => new PublicKey(m)) + : []; + + const instructions = stakeAccounts.reduce( + (instructions: TransactionInstruction[], stakeAccount: PublicKey) => { const transaction = StakeProgram.deactivate({ - stakePubkey: new PublicKey(stakeAccount), + stakePubkey: stakeAccount, authorizedPubkey, });