@exodus/ethereum-api 8.40.0 → 8.40.1

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/CHANGELOG.md CHANGED
@@ -3,6 +3,16 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [8.40.1](https://github.com/ExodusMovement/assets/compare/@exodus/ethereum-api@8.40.0...@exodus/ethereum-api@8.40.1) (2025-06-26)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+
12
+ * fix: activate `currentTipGasPrice` for bumped transactions in `tx-send` (#5950)
13
+
14
+
15
+
6
16
  ## [8.40.0](https://github.com/ExodusMovement/assets/compare/@exodus/ethereum-api@8.39.0...@exodus/ethereum-api@8.40.0) (2025-06-26)
7
17
 
8
18
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/ethereum-api",
3
- "version": "8.40.0",
3
+ "version": "8.40.1",
4
4
  "description": "Transaction monitors, fee monitors, RPC with the blockchain node, and other networking code for Ethereum and EVM-based blockchains",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -63,5 +63,5 @@
63
63
  "type": "git",
64
64
  "url": "git+https://github.com/ExodusMovement/assets.git"
65
65
  },
66
- "gitHead": "8c81c64076e7092e8a1a0d7c9a51f410a94aeec9"
66
+ "gitHead": "48a7c711842748ab188eb6bbbb575d1a13b8a6ab"
67
67
  }
@@ -50,14 +50,14 @@ export const scaleGasLimitEstimate = ({
50
50
  // be calculated with account's balance divided by gasPrice. If user's balance is too low,
51
51
  // the gasEstimation will fail. If gasPrice is set to '0x0', the account's balance is not
52
52
  // used to estimate gas.
53
- export async function estimateGasLimit(
53
+ export async function estimateGasLimit({
54
54
  asset,
55
55
  fromAddress,
56
56
  toAddress,
57
- amount,
57
+ amount = asset.currency.ZERO,
58
58
  data,
59
- gasPrice = '0x'
60
- ) {
59
+ gasPrice = '0x',
60
+ }) {
61
61
  const opts = {
62
62
  from: fromAddress,
63
63
  to: toAddress,
@@ -150,13 +150,13 @@ export async function fetchGasLimit({
150
150
  const txAmount = isToken ? asset.baseAsset.currency.ZERO : amount
151
151
 
152
152
  try {
153
- const estimatedGasLimit = await estimateGasLimit(
153
+ const estimatedGasLimit = await estimateGasLimit({
154
154
  asset,
155
155
  fromAddress,
156
- txToAddress,
157
- txAmount,
158
- txInput
159
- )
156
+ toAddress: txToAddress,
157
+ amount: txAmount,
158
+ data: txInput,
159
+ })
160
160
 
161
161
  return scaleGasLimitEstimate({ estimatedGasLimit, gasLimitMultiplier })
162
162
  } catch (err) {
@@ -359,14 +359,14 @@ export function createEthereumStakingService({
359
359
  amount = amount || asset.currency.ZERO
360
360
  from = from.toLowerCase()
361
361
 
362
- const estimatedGasLimit = await estimateGasLimit(
362
+ const estimatedGasLimit = await estimateGasLimit({
363
363
  asset,
364
- from,
365
- to.toLowerCase(),
364
+ fromAddress: from,
365
+ toAddress: to.toLowerCase(),
366
366
  amount, // staking contracts does not always require ETH amount to interact with
367
- txInput,
368
- DISABLE_BALANCE_CHECKS
369
- )
367
+ data: txInput,
368
+ gasPrice: DISABLE_BALANCE_CHECKS,
369
+ })
370
370
 
371
371
  const scaledGasLimit = scaleGasLimitEstimate({ estimatedGasLimit })
372
372
 
@@ -337,14 +337,14 @@ export function createPolygonStakingService({
337
337
 
338
338
  const amount = ethereum.currency.ZERO
339
339
 
340
- const gasLimit = await estimateGasLimit(
341
- ethereum,
342
- from,
343
- to,
340
+ const gasLimit = await estimateGasLimit({
341
+ asset: ethereum,
342
+ fromAddress: from,
343
+ toAddress: to,
344
344
  amount, // staking contracts does not require ETH amount to interact with
345
- txInput,
346
- DISABLE_BALANCE_CHECKS
347
- )
345
+ data: txInput,
346
+ gasPrice: DISABLE_BALANCE_CHECKS,
347
+ })
348
348
 
349
349
  return ethereum.api.getFee({ asset: ethereum, feeData, gasLimit, amount })
350
350
  }
@@ -158,12 +158,17 @@ const txSendFactory = ({ assetClientInterface, createUnsignedTx, useAbsoluteBala
158
158
  amount = (replacedTokenTx || replacedTx).coinAmount.negate()
159
159
  feeOpts.gasLimit = replacedTx.data.gasLimit
160
160
 
161
- const { gasPrice: currentGasPrice, baseFeePerGas: currentBaseFee } = feeData
161
+ const {
162
+ gasPrice: currentGasPrice,
163
+ baseFeePerGas: currentBaseFee,
164
+ tipGasPrice: currentTipGasPrice,
165
+ } = feeData
162
166
  const { bumpedGasPrice, bumpedTipGasPrice } = calculateBumpedGasPrice({
163
167
  baseAsset,
164
168
  tx: replacedTx,
165
169
  currentGasPrice,
166
170
  currentBaseFee,
171
+ currentTipGasPrice,
167
172
  eip1559Enabled,
168
173
  })
169
174
  feeOpts.gasPrice = bumpedGasPrice