@exodus/ethereum-api 2.5.1 → 2.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/ethereum-api",
3
- "version": "2.5.1",
3
+ "version": "2.6.1",
4
4
  "description": "Ethereum Api",
5
5
  "main": "src/index.js",
6
6
  "author": "Exodus Movement, Inc.",
@@ -10,7 +10,7 @@
10
10
  "access": "restricted"
11
11
  },
12
12
  "dependencies": {
13
- "@exodus/ethereum-lib": "^2.8.1",
13
+ "@exodus/ethereum-lib": "^2.9.1",
14
14
  "@exodus/simple-retry": "^0.0.6",
15
15
  "fetchival": "0.3.3",
16
16
  "lodash": "^4.17.11",
@@ -20,5 +20,5 @@
20
20
  "url-join": "4.0.0",
21
21
  "ws": "6.1.0"
22
22
  },
23
- "gitHead": "beb8b96a02d08dc9e32746e65d3c666cc77ed746"
23
+ "gitHead": "599004e8fe7b62f7c31feacbc2ee1db2322a6084"
24
24
  }
@@ -3,18 +3,21 @@ import { create } from './api'
3
3
  const EXODUS_ETH_SERVER_URL = 'https://geth.a.exodus.io/wallet/v1/'
4
4
  const EXODUS_ETC_SERVER_URL = 'https://getc.a.exodus.io/wallet/v1/'
5
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/'
6
7
 
7
8
  // allow self-signed certs
8
9
  // process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0'
9
10
  export const eth = create(EXODUS_ETH_SERVER_URL)
10
11
  export const etc = create(EXODUS_ETC_SERVER_URL)
11
12
  export const bsc = create(EXODUS_BSC_SERVER_URL)
13
+ export const polygon = create(EXODUS_POLYGON_SERVER_URL)
12
14
 
13
15
  // exported for in-library use only.
14
16
  export const serverMap = {
15
17
  ethereum: eth,
16
18
  ethereumclassic: etc,
17
19
  bsc,
20
+ matic: polygon,
18
21
  }
19
22
 
20
23
  export function getServer(asset) {
@@ -1,3 +1,4 @@
1
1
  export * from './ethereum'
2
2
  export * from './ethereumclassic'
3
3
  export * from './bsc'
4
+ export * from './polygon'
@@ -0,0 +1,12 @@
1
+ import { EthereumLikeFeeMonitor } from '@exodus/ethereum-lib'
2
+ import { polygon as polygonServer } from '../exodus-eth-server'
3
+
4
+ export class PolygonFeeMonitor extends EthereumLikeFeeMonitor {
5
+ constructor({ updateFee }) {
6
+ super({
7
+ updateFee,
8
+ assetName: 'matic',
9
+ getGasPrice: polygonServer.gasPrice,
10
+ })
11
+ }
12
+ }