@exodus/ethereum-lib 4.0.2 → 4.0.3

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": "4.0.2",
3
+ "version": "4.0.3",
4
4
  "description": "Ethereum Library",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -43,5 +43,5 @@
43
43
  "ms": "^2.1.1",
44
44
  "reselect": "~3.0.1"
45
45
  },
46
- "gitHead": "34b6a01e1035c2ca4f1c0e3fa34c3c096878e673"
46
+ "gitHead": "66d65ee9561df9952741317a358659a600dabe19"
47
47
  }
@@ -128,13 +128,9 @@ export const canAccelerateTx = ({
128
128
  if (isQueuedPendingTx(tx, baseAssetName, activeWalletAccount, getTxLog))
129
129
  return wrapResponseToObject({ errorMessage: 'there is a stuck TX with lower nonce' })
130
130
 
131
- const { gasPrice: currentGasPrice, gasPriceMinimumRate, eip1559Enabled } = getFeeData(assetName)
132
- // converting to the smallest unit to avoid rounding errors
133
- if (
134
- calculateTxGasPrice(tx)
135
- .to('wei')
136
- .gte(currentGasPrice.mul(gasPriceMinimumRate).to('wei'))
137
- )
131
+ const { gasPrice: currentGasPrice, eip1559Enabled } = getFeeData(assetName)
132
+
133
+ if (calculateTxGasPrice(tx).gte(currentGasPrice))
138
134
  return wrapResponseToObject({ errorMessage: 'the used gas price is still high enough' })
139
135
 
140
136
  const { bumpedGasPrice: gasPriceToUse } = calculateBumpedGasPrice({