@exodus/solana-api 2.5.21 → 2.5.22

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": "2.5.21",
3
+ "version": "2.5.22",
4
4
  "description": "Exodus internal Solana asset API wrapper",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -23,7 +23,7 @@
23
23
  "@exodus/models": "^10.1.0",
24
24
  "@exodus/nfts-core": "^0.5.0",
25
25
  "@exodus/simple-retry": "^0.0.6",
26
- "@exodus/solana-lib": "^1.7.0",
26
+ "@exodus/solana-lib": "^1.7.1",
27
27
  "@exodus/solana-meta": "^1.0.3",
28
28
  "bn.js": "^4.11.0",
29
29
  "debug": "^4.1.1",
@@ -34,5 +34,5 @@
34
34
  "devDependencies": {
35
35
  "@exodus/assets-testing": "file:../../../__testing__"
36
36
  },
37
- "gitHead": "d0aa3d128fe488e0d4849923e5b134b80b6fef97"
37
+ "gitHead": "c0a8ca34924dc74d81ea0b339aa0909062c79d1a"
38
38
  }
@@ -8,6 +8,7 @@ export default class SolanaFeeMonitor extends FeeMonitor {
8
8
 
9
9
  async fetchFee() {
10
10
  const fee = await api.getFee()
11
+ if (fee === undefined) throw new Error('Failed to fetch fee')
11
12
 
12
13
  return {
13
14
  fee: `${fee} Lamports`,
@@ -34,7 +34,11 @@ export class SolanaMonitor extends BaseMonitor {
34
34
  }
35
35
 
36
36
  async startListener({ walletAccount }) {
37
- const address = await this.aci.getReceiveAddress({ assetName: this.asset.name, walletAccount })
37
+ const address = await this.aci.getReceiveAddress({
38
+ assetName: this.asset.name,
39
+ walletAccount,
40
+ useCache: true,
41
+ })
38
42
  return this.api.watchAddress({
39
43
  address,
40
44
  /*
@@ -50,7 +54,11 @@ export class SolanaMonitor extends BaseMonitor {
50
54
  }
51
55
 
52
56
  async stopListener({ walletAccount }) {
53
- const address = await this.aci.getReceiveAddress({ assetName: this.asset.name, walletAccount })
57
+ const address = await this.aci.getReceiveAddress({
58
+ assetName: this.asset.name,
59
+ walletAccount,
60
+ useCache: true,
61
+ })
54
62
  return this.api.unwatchAddress({ address })
55
63
  }
56
64
 
@@ -93,7 +101,7 @@ export class SolanaMonitor extends BaseMonitor {
93
101
  this.api.setTokens(this.assets)
94
102
 
95
103
  const accountState = await this.aci.getAccountState({ assetName, walletAccount })
96
- const address = await this.aci.getReceiveAddress({ assetName, walletAccount })
104
+ const address = await this.aci.getReceiveAddress({ assetName, walletAccount, useCache: true })
97
105
  const stakingAddresses = await this.getStakingAddressesFromTxLog({ assetName, walletAccount })
98
106
 
99
107
  const { logItemsByAsset, hasNewTxs, cursorState } = await this.getHistory({