@exodus/ethereum-api 2.22.1 → 2.23.0

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.22.1",
3
+ "version": "2.23.0",
4
4
  "description": "Ethereum Api",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -9,18 +9,19 @@
9
9
  ],
10
10
  "author": "Exodus Movement, Inc.",
11
11
  "license": "UNLICENSED",
12
- "homepage": "https://github.com/ExodusMovement/ethereum#readme",
12
+ "homepage": "https://github.com/ExodusMovement/assets/tree/main/ethereum",
13
13
  "publishConfig": {
14
14
  "access": "restricted"
15
15
  },
16
16
  "dependencies": {
17
17
  "@exodus/asset-lib": "^3.5.4",
18
18
  "@exodus/crypto": "^1.0.0-rc.0",
19
- "@exodus/ethereum-lib": "^2.20.0",
19
+ "@exodus/ethereum-lib": "^2.21.0",
20
20
  "@exodus/ethereumjs-util": "^7.1.0-exodus.6",
21
+ "@exodus/fetch": "^1.2.1",
21
22
  "@exodus/simple-retry": "^0.0.6",
22
23
  "@exodus/solidity-contract": "^1.0.1",
23
- "fetchival": "0.3.3",
24
+ "events": "^1.1.1",
24
25
  "idna-uts46-hx": "^2.3.1",
25
26
  "js-sha3": "^0.8.0",
26
27
  "make-concurrent": "4.0.0",
@@ -35,5 +36,5 @@
35
36
  "@exodus/assets-base": "^8.0.136",
36
37
  "@exodus/models": "^8.7.2"
37
38
  },
38
- "gitHead": "6a99fbefed718767bf3f8a81f18881084ffbdb6c"
39
+ "gitHead": "5a1621d8fb3c1ecf4c47dc37f284e9a40d7fd018"
39
40
  }
@@ -1,9 +1,6 @@
1
1
  import ms from 'ms'
2
2
  import makeConcurrent from 'make-concurrent'
3
- import fetchival from 'fetchival'
4
- // The module in desktop explicitly sets node-fetch. Do we need this?
5
- // import fetch from '../fetch'
6
- // fetchival.fetch = fetch
3
+ import { fetchival } from '@exodus/fetch'
7
4
 
8
5
  const ETHERSCAN_API_URL = 'https://api.etherscan.io/api'
9
6
  const DEFAULT_ETHERSCAN_API_KEY = 'XM3VGRSNW1TMSIR14I9MVFP15X74GNHTRI'
@@ -1,4 +1,4 @@
1
- import { EventEmitter } from 'events'
1
+ import EventEmitter from 'events/' // '/' forces it to use the module from node_modules
2
2
  import ms from 'ms'
3
3
  import WebSocket from '../websocket'
4
4
 
@@ -1,8 +1,8 @@
1
1
  import urlJoin from 'url-join'
2
2
  import url from 'url'
3
- import fetchival from 'fetchival'
4
3
  import ms from 'ms'
5
4
  import createWebSocket from './ws'
5
+ import { fetchival } from '@exodus/fetch'
6
6
  import { retry } from '@exodus/simple-retry'
7
7
  import SolidityContract from '@exodus/solidity-contract'
8
8
  import { bufferToHex } from '@exodus/ethereumjs-util'
@@ -1,5 +1,5 @@
1
1
  import ms from 'ms'
2
- import { EventEmitter } from 'events'
2
+ import EventEmitter from 'events/' // '/' forces it to use the module from node_modules
3
3
  import WebSocket from '../websocket'
4
4
 
5
5
  const RECONNECT_INTERVAL = ms('10s')
@@ -6,11 +6,14 @@
6
6
  */
7
7
  if (
8
8
  typeof process !== 'undefined' &&
9
- process &&
10
9
  (process.type === 'renderer' || process.type === 'worker')
11
10
  ) {
12
11
  // THIS IS FOR DESKTOP
13
- module.exports = require('ws')
12
+ if (process.env.EXODUS_DISABLE_WS) {
13
+ module.exports = globalThis.WebSocket
14
+ } else {
15
+ module.exports = require('ws')
16
+ }
14
17
  } else {
15
18
  // eslint-disable-next-line no-undef
16
19
  if (global.window?.WebSocket) {