@glamsystems/glam-cli 0.1.35 → 0.1.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/main.js +3 -2
  2. package/package.json +2 -2
package/main.js CHANGED
@@ -5389,7 +5389,8 @@ class StakingClient {
5389
5389
  const { programId: stakePoolProgram, poolMint, withdrawAuthority, feeAccount, tokenProgramId: tokenProgram, validatorList, reserveStake, } = await this.getStakePoolAccountData(stakePool);
5390
5390
  const poolTokensFrom = this.base.getVaultAta(poolMint, tokenProgram);
5391
5391
  // The reserve stake account should NOT be used for withdrawals unless we have no other options.
5392
- const validatorStakeCandidates = (await (0, helpers_1.getStakeAccountsWithStates)(this.base.provider.connection, withdrawAuthority)).filter((s) => !s.address.equals(reserveStake));
5392
+ // And only active validator stake accounts should be used.
5393
+ const validatorStakeCandidates = (await (0, helpers_1.getStakeAccountsWithStates)(this.base.provider.connection, withdrawAuthority)).filter((s) => !s.address.equals(reserveStake) && s.state === "active");
5393
5394
  const validatorStakeAccount = validatorStakeCandidates.length === 0
5394
5395
  ? reserveStake
5395
5396
  : validatorStakeCandidates[0].address;
@@ -10866,7 +10867,7 @@ program
10866
10867
  .hook("preSubcommand", async (thisCommand, actionCommand) => {
10867
10868
  await (0, idl_1.idlCheck)(glamClient);
10868
10869
  })
10869
- .version("0.1.35");
10870
+ .version("0.1.36");
10870
10871
  program
10871
10872
  .command("env")
10872
10873
  .description("Display current environment setup")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glamsystems/glam-cli",
3
- "version": "0.1.35",
3
+ "version": "0.1.36",
4
4
  "description": "CLI for interacting with the GLAM Protocol",
5
5
  "main": "./main.js",
6
6
  "bin": {
@@ -21,7 +21,7 @@
21
21
  "node": ">=20.18.0"
22
22
  },
23
23
  "dependencies": {
24
- "@glamsystems/glam-sdk": "0.1.35",
24
+ "@glamsystems/glam-sdk": "0.1.36",
25
25
  "commander": "^11.1.0",
26
26
  "inquirer": "^8.2.6",
27
27
  "@switchboard-xyz/common": "^3.0.0"