@exodus/solana-api 3.11.4 → 3.11.6
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.11.6](https://github.com/ExodusMovement/assets/compare/@exodus/solana-api@3.11.5...@exodus/solana-api@3.11.6) (2024-10-24)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* clean SOL stake activation ([#4358](https://github.com/ExodusMovement/assets/issues/4358)) ([f57a84d](https://github.com/ExodusMovement/assets/commit/f57a84d2b233c58dd100deba82c11d8225ec12d6))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
## [3.11.5](https://github.com/ExodusMovement/assets/compare/@exodus/solana-api@3.11.4...@exodus/solana-api@3.11.5) (2024-10-24)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* SOL activation state ([#4347](https://github.com/ExodusMovement/assets/issues/4347)) ([534a39c](https://github.com/ExodusMovement/assets/commit/534a39c4210eedce70736e70753902cce2e25565))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
6
24
|
## [3.11.4](https://github.com/ExodusMovement/assets/compare/@exodus/solana-api@3.11.3...@exodus/solana-api@3.11.4) (2024-10-24)
|
|
7
25
|
|
|
8
26
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exodus/solana-api",
|
|
3
|
-
"version": "3.11.
|
|
3
|
+
"version": "3.11.6",
|
|
4
4
|
"description": "Exodus internal Solana asset API wrapper",
|
|
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": "
|
|
50
|
+
"gitHead": "9f6df3424f1c59d5b7efaa22b3db36eaa915b651",
|
|
51
51
|
"bugs": {
|
|
52
52
|
"url": "https://github.com/ExodusMovement/assets/issues?q=is%3Aissue+is%3Aopen+label%3Asolana-api"
|
|
53
53
|
},
|
|
@@ -23,7 +23,7 @@ function getStakeAndActivating(
|
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
if (targetEpoch === delegation.activationEpoch) {
|
|
26
|
+
if (targetEpoch === Number(delegation.activationEpoch)) {
|
|
27
27
|
// all is activating
|
|
28
28
|
return {
|
|
29
29
|
effective: 0,
|
|
@@ -92,7 +92,7 @@ export function getStakeActivatingAndDeactivating(delegation, targetEpoch, stake
|
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
-
if (targetEpoch === delegation.deactivationEpoch) {
|
|
95
|
+
if (targetEpoch === Number(delegation.deactivationEpoch)) {
|
|
96
96
|
// can only deactivate what's activated
|
|
97
97
|
return {
|
|
98
98
|
effective,
|
|
@@ -9,6 +9,7 @@ export async function getStakeActivation(api, stakeAddress) {
|
|
|
9
9
|
api.getEpochInfo(),
|
|
10
10
|
(async () => {
|
|
11
11
|
const stakeAccount = await api.getAccountInfo(stakeAddress)
|
|
12
|
+
if (!stakeAccount) return null
|
|
12
13
|
if (stakeAccount.data.discriminant === 0) {
|
|
13
14
|
throw new Error('data.discriminant is 0')
|
|
14
15
|
}
|
|
@@ -20,6 +21,13 @@ export async function getStakeActivation(api, stakeAddress) {
|
|
|
20
21
|
})(),
|
|
21
22
|
])
|
|
22
23
|
|
|
24
|
+
if (!stakeAccount)
|
|
25
|
+
return {
|
|
26
|
+
status: 'inactive',
|
|
27
|
+
active: 0,
|
|
28
|
+
inactive: 0,
|
|
29
|
+
}
|
|
30
|
+
|
|
23
31
|
const rentExemptReserve = stakeAccount.data.parsed.info.meta.rentExemptReserve
|
|
24
32
|
if (stakeAccount.data.parsed.discriminant === 1) {
|
|
25
33
|
return {
|