@exodus/solana-api 3.6.0 → 3.6.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/solana-api",
3
- "version": "3.6.0",
3
+ "version": "3.6.1",
4
4
  "description": "Exodus internal Solana asset API wrapper",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -29,7 +29,7 @@
29
29
  "@exodus/models": "^10.1.0",
30
30
  "@exodus/nfts-core": "^0.5.0",
31
31
  "@exodus/simple-retry": "^0.0.6",
32
- "@exodus/solana-lib": "^3.1.1",
32
+ "@exodus/solana-lib": "^3.4.2",
33
33
  "@exodus/solana-meta": "^1.0.7",
34
34
  "bn.js": "^4.11.0",
35
35
  "debug": "^4.1.1",
@@ -45,5 +45,5 @@
45
45
  "@exodus/assets-testing": "^1.0.0",
46
46
  "@solana/web3.js": "^1.91.8"
47
47
  },
48
- "gitHead": "4150f6ca3557ebe8bb5bed70bc1934cc2bd97716"
48
+ "gitHead": "9d24eb58422692fc1acdcb834061d02b2632801d"
49
49
  }
@@ -6,6 +6,8 @@ import { isNumberUnit } from '@exodus/currency'
6
6
  const parseBalance = (balance, asset) =>
7
7
  !isNumberUnit(balance) && isString(balance) ? asset.currency.parse(balance) : balance
8
8
 
9
+ export const DEFAULT_POOL_ADDRESS = '9QU2QSxhb24FUX3Tu2FpczXjpK3VYrvRudywSZaM29mF' // Everstake
10
+
9
11
  export const createAccountState = ({ assetList }) => {
10
12
  const asset = assetList.find((asset) => asset.baseAssetName === asset.name)
11
13
  const tokens = assetList.filter((asset) => asset.baseAssetName !== asset.name)
@@ -20,7 +22,7 @@ export const createAccountState = ({ assetList }) => {
20
22
  staking: {
21
23
  // remote-config data
22
24
  enabled: true,
23
- pool: null,
25
+ pool: DEFAULT_POOL_ADDRESS,
24
26
  },
25
27
  isDelegating: false,
26
28
  locked: asset.currency.defaultUnit(0),
@@ -3,7 +3,7 @@ import _ from 'lodash'
3
3
  import assert from 'minimalistic-assert'
4
4
  import ms from 'ms'
5
5
 
6
- const DEFAULT_POOL_ADDRESS = '9QU2QSxhb24FUX3Tu2FpczXjpK3VYrvRudywSZaM29mF' // Everstake
6
+ import { DEFAULT_POOL_ADDRESS } from '../account-state'
7
7
 
8
8
  const DEFAULT_REMOTE_CONFIG = {
9
9
  rpcs: [],
@@ -148,7 +148,7 @@ export class SolanaMonitor extends BaseMonitor {
148
148
  const fetchStakingInfo = this.tickCount[walletAccount] % this.ticksBetweenStakeFetches === 0
149
149
  const staking = fetchStakingInfo
150
150
  ? await this.getStakingInfo({ address, stakingAddresses })
151
- : accountState.mem
151
+ : { ...accountState.mem, staking: this.staking }
152
152
 
153
153
  const tokenAccounts = await this.api.getTokenAccountsByOwner(address)
154
154
  const account = await this.getAccount({ address, staking, tokenAccounts })