@exodus/ethereum-api 2.21.1 → 2.21.3

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.21.1",
3
+ "version": "2.21.3",
4
4
  "description": "Ethereum Api",
5
5
  "main": "src/index.js",
6
6
  "author": "Exodus Movement, Inc.",
@@ -12,7 +12,7 @@
12
12
  "dependencies": {
13
13
  "@exodus/asset-lib": "^3.5.4",
14
14
  "@exodus/crypto": "^1.0.0-rc.0",
15
- "@exodus/ethereum-lib": "^2.19.1",
15
+ "@exodus/ethereum-lib": "^2.19.3",
16
16
  "@exodus/ethereumjs-util": "^7.1.0-exodus.6",
17
17
  "@exodus/simple-retry": "^0.0.6",
18
18
  "@exodus/solidity-contract": "^1.0.1",
@@ -29,5 +29,5 @@
29
29
  "@exodus/assets-base": "^8.0.136",
30
30
  "@exodus/models": "^8.7.2"
31
31
  },
32
- "gitHead": "d670e5f788be18d425c7213e20da396e5b25b037"
32
+ "gitHead": "079d56fb0055573854a0a4b4bca145ffd83de883"
33
33
  }
@@ -1,32 +1,21 @@
1
+ import { DEFAULT_SERVER_URLS, ETHEREUM_LIKE_ASSETS } from '@exodus/ethereum-lib'
2
+
1
3
  import { create } from './api'
2
4
 
3
- const EXODUS_ETH_SERVER_URL = 'https://geth.a.exodus.io/wallet/v1/'
4
- const EXODUS_ETC_SERVER_URL = 'https://getc.a.exodus.io/wallet/v1/'
5
- const EXODUS_BSC_SERVER_URL = 'https://bsc.a.exodus.io/wallet/v1/'
6
- const EXODUS_POLYGON_SERVER_URL = 'https://polygon.a.exodus.io/wallet/v1/'
7
- const EXODUS_AVAXC_SERVER_URL = 'https://avax-c.a.exodus.io/wallet/v1/'
8
- const EXODUS_FTM_SERVER_URL = 'https://fantom.a.exodus.io/wallet/v1/'
9
- const EXODUS_HARMONY_SERVER_URL = 'https://harmony.a.exodus.io/wallet/v1/'
5
+ // exported for in-library use only.
6
+ export const serverMap = Object.fromEntries(
7
+ ETHEREUM_LIKE_ASSETS.map((assetName) => [assetName, create(DEFAULT_SERVER_URLS[assetName])])
8
+ )
9
+
10
10
  // allow self-signed certs
11
11
  // process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0'
12
- export const eth = create(EXODUS_ETH_SERVER_URL)
13
- export const etc = create(EXODUS_ETC_SERVER_URL)
14
- export const bsc = create(EXODUS_BSC_SERVER_URL)
15
- export const polygon = create(EXODUS_POLYGON_SERVER_URL)
16
- export const avaxc = create(EXODUS_AVAXC_SERVER_URL)
17
- export const ftm = create(EXODUS_FTM_SERVER_URL)
18
- export const harmony = create(EXODUS_HARMONY_SERVER_URL)
19
-
20
- // exported for in-library use only.
21
- export const serverMap = {
22
- ethereum: eth,
23
- ethereumclassic: etc,
24
- bsc,
25
- matic: polygon,
26
- avalanchec: avaxc,
27
- fantommainnet: ftm,
28
- harmonymainnet: harmony,
29
- }
12
+ export const eth = serverMap['ethereum']
13
+ export const etc = serverMap['ethereumclassic']
14
+ export const bsc = serverMap['bsc']
15
+ export const polygon = serverMap['matic']
16
+ export const avaxc = serverMap['avalanchec']
17
+ export const ftm = serverMap['fantommainnet']
18
+ export const harmony = serverMap['harmonymainnet']
30
19
 
31
20
  export function getServer(asset) {
32
21
  const baseAssetName = asset.baseAsset.name