@exodus/ethereum-lib 1.1.3 → 1.1.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-lib",
3
- "version": "1.1.3",
3
+ "version": "1.1.5",
4
4
  "description": "Ethereum Library",
5
5
  "main": "src/index.js",
6
6
  "author": "Exodus Movement, Inc.",
@@ -21,5 +21,5 @@
21
21
  "peerDependencies": {
22
22
  "@exodus/assets": "8.0.x"
23
23
  },
24
- "gitHead": "db11e8fde8a4288a2cea2329f4a91bfad7e210d1"
24
+ "gitHead": "f6642c1e3ef9004b27923176c5654103efad1181"
25
25
  }
@@ -29,12 +29,15 @@ export default (
29
29
  const walletAccountBalances = getWalletAccountBalances(activeWalletAccount)
30
30
  const assetName = tx.coinName
31
31
  const { gasPrice } = getFeeData(assetName)
32
- const usedGasPrice = tx.feeAmount.div(tx.meta.gasLimit)
32
+ const usedGasPrice = tx.feeAmount.div(tx.data.gasLimit)
33
33
  if (usedGasPrice.gte(gasPrice)) {
34
34
  return BumpType.NONE
35
35
  }
36
- const fee = getFee(assetName, { gasLimit: tx.meta.gasLimit })
37
- .mul(11) // new gas price should be at least 10% higher
36
+ const fee = getFee(
37
+ { asset: assetName, walletAccount: activeWalletAccount },
38
+ { gasLimit: tx.data.gasLimit }
39
+ )
40
+ .mul(12) // new gas price should be at least 20% higher
38
41
  .div(10)
39
42
  if (walletAccountBalances[assetName].lt(fee)) return BumpType.NONE
40
43