@exodus/ethereum-lib 2.10.4 → 2.10.6

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.10.4",
3
+ "version": "2.10.6",
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": "704f2a8459929ab1c12653de7df84d1406b67e0f"
27
+ "gitHead": "c4cb814f32493aea178c8ed6cf07c8df5ea97c1f"
28
28
  }
@@ -88,14 +88,12 @@ export const calculateBumpedGasPrice = ({ baseAsset, tx, currentGasPrice, eip155
88
88
  let bumpedGasPrice = usedGasPrice.mul(BUMP_RATE)
89
89
  bumpedGasPrice = currentGasPrice.gt(bumpedGasPrice) ? currentGasPrice : bumpedGasPrice
90
90
 
91
- const tipGasPrice = tx.data?.tipGasPrice
92
- ? baseAsset.currency.baseUnit(tx.data.tipGasPrice).to('Gwei')
93
- : baseAsset.currency.parse('2 Gwei') // we bump a legacy tx by an EIP1559 tx
94
- const bumpedTipGasPrice = tipGasPrice.mul(BUMP_RATE)
95
-
96
- return eip1559Enabled
91
+ return eip1559Enabled && tx.data?.tipGasPrice
97
92
  ? {
98
- bumpedTipGasPrice,
93
+ bumpedTipGasPrice: baseAsset.currency
94
+ .baseUnit(tx.data.tipGasPrice)
95
+ .to('Gwei')
96
+ .mul(BUMP_RATE),
99
97
  bumpedGasPrice,
100
98
  }
101
99
  : { bumpedGasPrice }
@@ -155,7 +153,6 @@ export default (
155
153
  )
156
154
  // converting to the smallest unit to avoid rounding errors
157
155
  if (
158
- !eip1559Enabled &&
159
156
  calculateTxGasPrice(tx)
160
157
  .to('wei')
161
158
  .gte(currentGasPrice.mul(gasPriceMinimumRate).to('wei'))