@exodus/solana-api 3.13.2 → 3.13.4

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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,24 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [3.13.4](https://github.com/ExodusMovement/assets/compare/@exodus/solana-api@3.13.3...@exodus/solana-api@3.13.4) (2025-01-22)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+
12
+ * fix: unstaked, unstaking balances (#4874)
13
+
14
+
15
+
16
+ ## [3.13.3](https://github.com/ExodusMovement/assets/compare/@exodus/solana-api@3.13.2...@exodus/solana-api@3.13.3) (2025-01-17)
17
+
18
+ **Note:** Version bump only for package @exodus/solana-api
19
+
20
+
21
+
22
+
23
+
6
24
  ## [3.13.2](https://github.com/ExodusMovement/assets/compare/@exodus/solana-api@3.13.1...@exodus/solana-api@3.13.2) (2025-01-09)
7
25
 
8
26
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/solana-api",
3
- "version": "3.13.2",
3
+ "version": "3.13.4",
4
4
  "description": "Transaction monitors, fee monitors, RPC with the blockchain node, and other networking code for Solana",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -47,7 +47,7 @@
47
47
  "@exodus/assets-testing": "^1.0.0",
48
48
  "@exodus/solana-web3.js": "^1.63.1-exodus.9-rc3"
49
49
  },
50
- "gitHead": "151e1c1fe2be1bce04f4a4717dbaf7589e172a1e",
50
+ "gitHead": "c02457a2ad2142debd460a2b2263e84a2d8748a8",
51
51
  "bugs": {
52
52
  "url": "https://github.com/ExodusMovement/assets/issues?q=is%3Aissue+is%3Aopen+label%3Asolana-api"
53
53
  },
@@ -46,9 +46,14 @@ export const getBalancesFactory =
46
46
 
47
47
  const spendable = balanceWithoutStaking.sub(walletReserve).sub(networkReserve).clampLowerZero()
48
48
 
49
+ // leave enough amount for accountReserve if it's not reserved already
50
+ const stakeable = walletReserve.isZero ? spendable.sub(accountReserve) : spendable
51
+
49
52
  const staked = locked
50
53
  const unstaking = pending
51
54
 
55
+ const staking = accountState.activating || zero
56
+
52
57
  return {
53
58
  // legacy
54
59
  balance: total,
@@ -56,7 +61,9 @@ export const getBalancesFactory =
56
61
  // new
57
62
  total,
58
63
  spendable,
64
+ stakeable,
59
65
  staked,
66
+ staking,
60
67
  unstaking,
61
68
  networkReserve,
62
69
  walletReserve,