@exodus/ethereum-lib 3.3.17 → 3.3.19

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": "3.3.17",
3
+ "version": "3.3.19",
4
4
  "description": "Ethereum Library",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -42,5 +42,5 @@
42
42
  "ms": "^2.1.1",
43
43
  "reselect": "~3.0.1"
44
44
  },
45
- "gitHead": "3136300271d95cc45ede933376793608f1196589"
45
+ "gitHead": "9d8358f8401e41cff393d63d50cfc1cd6e8cdc88"
46
46
  }
package/src/encode.js CHANGED
@@ -31,7 +31,11 @@ export function encodePublic(compressedPubKey, { baseAssetName } = {}) {
31
31
  const hash160bits = etherUtil.publicToAddress(compressedPubKey, true)
32
32
 
33
33
  if (baseAssetName && CHAIN_IDS[baseAssetName]) {
34
- return etherUtil.toChecksumAddress('0x' + hash160bits.toString('hex'), CHAIN_IDS[baseAssetName])
34
+ const address = etherUtil.toChecksumAddress(
35
+ '0x' + hash160bits.toString('hex'),
36
+ CHAIN_IDS[baseAssetName]
37
+ )
38
+ return baseAssetName === 'rootstock' ? address.toLowerCase() : address
35
39
  }
36
40
  return etherUtil.toChecksumAddress('0x' + hash160bits.toString('hex'))
37
41
  }
@@ -6,7 +6,7 @@ export default new FeeData({
6
6
  gasPrice: '0.07 Gwei',
7
7
  max: '1 Gwei',
8
8
  min: '0.001 Gwei',
9
- fuelThreshold: '0.1 Gwei',
9
+ fuelThreshold: '7500 Gwei',
10
10
  gasPriceEconomicalRate: 0.8,
11
11
  gasPriceMinimumRate: 0.6,
12
12
  eip1559Enabled: false,
@@ -0,0 +1,17 @@
1
+ import { FeeData } from '@exodus/asset-lib'
2
+ import { asset } from '@exodus/cronos-meta'
3
+
4
+ export default new FeeData({
5
+ config: {
6
+ gasPrice: '5500 Gwei',
7
+ max: '6500 Gwei',
8
+ min: '5000 Gwei',
9
+ fuelThreshold: '4000 Gwei',
10
+ gasPriceEconomicalRate: 0.8,
11
+ gasPriceMinimumRate: 0.6,
12
+ enableFeeDelegation: false,
13
+ eip1559Enabled: false,
14
+ },
15
+ mainKey: 'gasPrice',
16
+ currency: asset.currency,
17
+ })
@@ -6,7 +6,7 @@ export default new FeeData({
6
6
  gasPrice: '25 Gwei',
7
7
  max: '250 Gwei',
8
8
  min: '0.1 Gwei',
9
- fuelThreshold: '25 Gwei',
9
+ fuelThreshold: '1500000 Gwei',
10
10
  gasPriceEconomicalRate: 0.8,
11
11
  gasPriceMinimumRate: 0.6,
12
12
  eip1559Enabled: false,
@@ -12,3 +12,4 @@ export { default as rootstock } from './rootstock'
12
12
  export { default as optimism } from './optimism'
13
13
  export { default as flare } from './flare'
14
14
  export { default as aurora } from './aurora'
15
+ export { default as cronos } from './cronos'
@@ -6,7 +6,7 @@ export default new FeeData({
6
6
  gasPrice: '0.06 Gwei',
7
7
  max: '5 Gwei',
8
8
  min: '0.001 Gwei',
9
- fuelThreshold: '5 Gwei',
9
+ fuelThreshold: '4000 Gwei',
10
10
  gasPriceEconomicalRate: 0.8,
11
11
  gasPriceMinimumRate: 0.6,
12
12
  eip1559Enabled: false,
@@ -25,6 +25,7 @@ export const isRootstockToken = (asset) => asset.assetType === 'RSK_ERC20'
25
25
  export const isOptimismToken = (asset) => asset.assetType === 'OPT_ERC20'
26
26
  export const isFlareToken = (asset) => asset.assetType === 'FLR_ERC20'
27
27
  export const isAuroraToken = (asset) => asset.assetType === 'AURORA_ERC20'
28
+ export const isCronosToken = (asset) => asset.assetType === 'CRC20'
28
29
 
29
30
  // All ethereum-like tokens
30
31
  export const isEthereumLikeToken = (asset) => ETHEREUM_LIKE_TOKEN_TYPES.includes(asset.assetType)