@exodus/ethereum-api 2.26.0 → 2.26.2

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/ethereum-api",
3
- "version": "2.26.0",
3
+ "version": "2.26.2",
4
4
  "description": "Ethereum Api",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -14,9 +14,9 @@
14
14
  "access": "restricted"
15
15
  },
16
16
  "dependencies": {
17
- "@exodus/asset-lib": "^3.5.4",
17
+ "@exodus/asset-lib": "^3.7.1",
18
18
  "@exodus/crypto": "^1.0.0-rc.0",
19
- "@exodus/ethereum-lib": "^2.22.0",
19
+ "@exodus/ethereum-lib": "^2.22.1",
20
20
  "@exodus/ethereumjs-util": "^7.1.0-exodus.6",
21
21
  "@exodus/fetch": "^1.2.1",
22
22
  "@exodus/simple-retry": "^0.0.6",
@@ -32,7 +32,7 @@
32
32
  "ws": "^6.1.0"
33
33
  },
34
34
  "devDependencies": {
35
- "@exodus/models": "^8.7.2"
35
+ "@exodus/models": "^8.10.4"
36
36
  },
37
- "gitHead": "c7534c623d4c2abb024d2c983399130ddb3b434f"
37
+ "gitHead": "20a76440ef521add9b6c61a79cb924c66f3b0271"
38
38
  }
@@ -116,7 +116,7 @@ async function tryToDecodeApprovalTransaction(transaction) {
116
116
  const [grantedTo, balance] = decodedInput.values
117
117
 
118
118
  const symbol =
119
- (await getAssetSymbolFromContract(transaction.to)).toUpperCase() || 'Unknown Token'
119
+ (await getAssetSymbolFromContract(transaction.to))?.toUpperCase() || 'Unknown Token'
120
120
 
121
121
  return [{ grantedTo, balance, symbol, decimals: undefined }] // ToDo: Return 'decimals' in the future once we support changing the approval amount.
122
122
  } catch (e) {
@@ -281,7 +281,7 @@ export class EthereumMonitor extends BaseMonitor {
281
281
  server: this.server,
282
282
  timer: this.timer,
283
283
  tick: (...args) => this.tick(...args),
284
- tickAllWalletAccounts: () => this.tickAllWalletAccounts(),
284
+ tickWalletAccounts: () => this.tickWalletAccounts(),
285
285
  addressesByWalletAccount,
286
286
  beforeStart: true,
287
287
  })
@@ -7,7 +7,6 @@ const UPDATE_LOOP_INTERVAL = ms('5m')
7
7
  export function subscribeToWSNotifications({
8
8
  addressesByWalletAccount,
9
9
  tick,
10
- getState,
11
10
  server,
12
11
  beforeStart = false,
13
12
  }) {
@@ -18,12 +17,12 @@ export function subscribeToWSNotifications({
18
17
 
19
18
  server.ws.watch(address)
20
19
  server.ws.events.on(`address-${address}`, () => {
21
- tick({ refresh: false, getState, walletAccount })
20
+ tick({ refresh: false, walletAccount })
22
21
  })
23
22
  subscribedToAddressNotificationsMap.set(mapKey, true)
24
23
  if (!beforeStart) {
25
24
  // tick for a new wallet account
26
- tick({ refresh: false, getState, walletAccount })
25
+ tick({ refresh: false, walletAccount })
27
26
  }
28
27
  })
29
28
  }
@@ -43,9 +42,7 @@ export function enableWSUpdates({
43
42
  interval,
44
43
  server,
45
44
  timer,
46
- dispatch,
47
- getState,
48
- tickAllWalletAccounts,
45
+ tickWalletAccounts,
49
46
  tick,
50
47
  addressesByWalletAccount,
51
48
  beforeStart = false,
@@ -54,7 +51,6 @@ export function enableWSUpdates({
54
51
 
55
52
  subscribeToWSNotifications({
56
53
  server,
57
- getState,
58
54
  beforeStart,
59
55
  tick,
60
56
  addressesByWalletAccount,
@@ -68,7 +64,7 @@ export function enableWSUpdates({
68
64
  server.ws.events.on('close', async () => {
69
65
  if (timer.isRunning) {
70
66
  await timer.setNewInterval(defaultInterval)
71
- return tickAllWalletAccounts({ dispatch, getState })
67
+ return tickWalletAccounts()
72
68
  }
73
69
  })
74
70
  server.ws.open()