@exodus/ethereum-api 2.4.3 → 2.4.5

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.4.3",
3
+ "version": "2.4.5",
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.7.2",
13
+ "@exodus/ethereum-lib": "^2.7.4",
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": "cd08eeb37f107463a6285a9fb151a97e6e1cd2c7"
23
+ "gitHead": "14b8266879ea622f272c94f98e71c1a16dd274f1"
24
24
  }
@@ -1,6 +1,6 @@
1
1
  import BN from 'bn.js'
2
2
  import * as ethUtil from 'ethereumjs-util'
3
- import { currency2buffer, isEthereumToken } from '@exodus/ethereum-lib'
3
+ import { currency2buffer, isToken } from '@exodus/ethereum-lib'
4
4
  import { estimateGas, isContractAddress } from './eth-like-util'
5
5
 
6
6
  const EXTRA_PERCENTAGE = 20
@@ -48,8 +48,8 @@ export async function fetchGasLimit({
48
48
  if (!amount) amount = asset.currency.ZERO
49
49
  if (!feeData.gasPrice) feeData.gasPrice = asset.baseAsset.currency.ZERO
50
50
 
51
- const isToken = isEthereumToken(asset)
52
- if (isToken) {
51
+ const _isToken = isToken(asset)
52
+ if (_isToken) {
53
53
  txInput = ethUtil.bufferToHex(
54
54
  asset.contract.transfer.build(toAddress, amount.toBase().toNumberString())
55
55
  )
@@ -91,7 +91,7 @@ export async function fetchGasLimit({
91
91
  console.log('fetchGasLimit error', err)
92
92
  }
93
93
 
94
- return isToken ? asset.gasLimit : asset.contractGasLimit
94
+ return _isToken ? asset.gasLimit : asset.contractGasLimit
95
95
  }
96
96
 
97
97
  function normalizeAmount(amount) {