@exodus/ethereum-lib 2.9.0 → 2.9.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-lib",
|
|
3
|
-
"version": "2.9.
|
|
3
|
+
"version": "2.9.2",
|
|
4
4
|
"description": "Ethereum Library",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"author": "Exodus Movement, Inc.",
|
|
@@ -24,5 +24,5 @@
|
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"@exodus/assets": "8.0.x"
|
|
26
26
|
},
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "af9e866f1c91afe63f709b7517c7ba11c8f8e7d5"
|
|
28
28
|
}
|
package/src/fee-data/ethereum.js
CHANGED
|
@@ -11,7 +11,9 @@ export default new FeeData(
|
|
|
11
11
|
gasPriceMinimumRate: 0.5,
|
|
12
12
|
enableFeeDelegation: false,
|
|
13
13
|
tipGasPrice: '2 Gwei',
|
|
14
|
-
|
|
14
|
+
minTipGasPrice: '1 Gwei',
|
|
15
|
+
maxTipGasPrice: '5 Gwei',
|
|
16
|
+
baseFeeMultiplier: 1.6019, // 1.125^4
|
|
15
17
|
eip1559Enabled: false,
|
|
16
18
|
},
|
|
17
19
|
'gasPrice',
|
|
@@ -18,6 +18,11 @@ export default class EthereumLikeFeeMonitor extends FeeMonitor {
|
|
|
18
18
|
this.eip1559Enabled = eip1559Enabled
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
+
setEip1559Enabled(bool) {
|
|
22
|
+
// bool set by remote-config
|
|
23
|
+
this.eip1559Enabled = bool
|
|
24
|
+
}
|
|
25
|
+
|
|
21
26
|
async fetchFee() {
|
|
22
27
|
let gasPrice = parseInt(await this.getGasPrice(), 16)
|
|
23
28
|
|
package/src/utils/index.js
CHANGED
|
@@ -11,11 +11,15 @@ const base16 = baseX('0123456789abcdef')
|
|
|
11
11
|
|
|
12
12
|
export const isEthereumToken = (asset) => asset.assetType === 'ETHEREUM_ERC20'
|
|
13
13
|
export const isBscToken = (asset) => asset.assetType === 'BSC_BEP20'
|
|
14
|
+
export const isPolygonToken = (asset) => asset.assetType === 'MATIC_ERC20'
|
|
15
|
+
|
|
14
16
|
// All ethereum-like tokens
|
|
15
17
|
export const isEthereumLikeToken = (asset) => ETHEREUM_LIKE_TOKEN_TYPES.includes(asset.assetType)
|
|
16
18
|
export const isToken = isEthereumLikeToken
|
|
19
|
+
|
|
17
20
|
// All ethereum-like assets (native coins)
|
|
18
21
|
export const isEthereumLikeAsset = (asset) => ETHEREUM_LIKE_ASSETS.includes(asset.name)
|
|
22
|
+
|
|
19
23
|
// All ethereum-like assets and tokens
|
|
20
24
|
export const isEthereumLike = (asset) => ETHEREUM_LIKE_ASSETS.includes(asset.baseAsset.name)
|
|
21
25
|
|