@exodus/solana-api 3.20.4 → 3.20.5

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,16 @@
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.20.5](https://github.com/ExodusMovement/assets/compare/@exodus/solana-api@3.20.4...@exodus/solana-api@3.20.5) (2025-07-11)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+
12
+ * fix: catch SOL rewards endpoint error (#6055)
13
+
14
+
15
+
6
16
  ## [3.20.4](https://github.com/ExodusMovement/assets/compare/@exodus/solana-api@3.20.3...@exodus/solana-api@3.20.4) (2025-07-01)
7
17
 
8
18
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/solana-api",
3
- "version": "3.20.4",
3
+ "version": "3.20.5",
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",
@@ -46,7 +46,7 @@
46
46
  "@exodus/assets-testing": "^1.0.0",
47
47
  "@exodus/solana-web3.js": "^1.63.1-exodus.9-rc3"
48
48
  },
49
- "gitHead": "3ce3cad33597f430b7c215fced6d19344fc05c69",
49
+ "gitHead": "a9e60de2523a51767c196be24865fa9d0bde7629",
50
50
  "bugs": {
51
51
  "url": "https://github.com/ExodusMovement/assets/issues?q=is%3Aissue+is%3Aopen+label%3Asolana-api"
52
52
  },
@@ -325,7 +325,7 @@ export class SolanaMonitor extends BaseMonitor {
325
325
 
326
326
  const staking =
327
327
  this.isStakingEnabled() && fetchStakingInfo
328
- ? await this.getStakingInfo({ address, walletAccount })
328
+ ? await this.getStakingInfo({ address, accountState, walletAccount })
329
329
  : { ...accountState.stakingInfo, staking: this.staking }
330
330
 
331
331
  const stakedBalance = this.asset.currency.baseUnit(staking.locked)
@@ -366,9 +366,15 @@ export class SolanaMonitor extends BaseMonitor {
366
366
  return this.updateAccountState({ newData, walletAccount })
367
367
  }
368
368
 
369
- async getStakingInfo({ address, walletAccount }) {
369
+ async getStakingInfo({ address, accountState, walletAccount }) {
370
370
  const stakingInfo = await this.api.getStakeAccountsInfo(address)
371
- const rewards = await this.api.getRewards(address)
371
+ let earned = accountState.stakingInfo.earned.toBaseString()
372
+ try {
373
+ const rewards = await this.api.getRewards(address)
374
+ earned = rewards
375
+ } catch (error) {
376
+ console.warn(error)
377
+ }
372
378
 
373
379
  return {
374
380
  loaded: true,
@@ -380,7 +386,7 @@ export class SolanaMonitor extends BaseMonitor {
380
386
  activating: this.asset.currency.baseUnit(stakingInfo.activating),
381
387
  withdrawable: this.asset.currency.baseUnit(stakingInfo.withdrawable),
382
388
  pending: this.asset.currency.baseUnit(stakingInfo.pending), // still undelegating (not yet available for withdraw)
383
- earned: this.asset.currency.baseUnit(rewards),
389
+ earned: this.asset.currency.baseUnit(earned),
384
390
  accounts: stakingInfo.accounts, // Obj
385
391
  }
386
392
  }