@exodus/ethereum-api 8.29.0 → 8.29.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,18 @@
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.29.1](https://github.com/ExodusMovement/assets/compare/@exodus/ethereum-api@8.29.0...@exodus/ethereum-api@8.29.1) (2025-02-10)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+
12
+ * fix: clarity baseGasPrice ws field (#5029)
13
+
14
+ * fix: magnifier returns 0 as base fee in WS (#5030)
15
+
16
+
17
+
6
18
  ## [8.29.0](https://github.com/ExodusMovement/assets/compare/@exodus/ethereum-api@8.28.1...@exodus/ethereum-api@8.29.0) (2025-02-06)
7
19
 
8
20
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/ethereum-api",
3
- "version": "8.29.0",
3
+ "version": "8.29.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",
@@ -64,5 +64,5 @@
64
64
  "type": "git",
65
65
  "url": "git+https://github.com/ExodusMovement/assets.git"
66
66
  },
67
- "gitHead": "45145f8d82dcee20192872aae962f9c1e1bfc487"
67
+ "gitHead": "568c314fb59b4dee5fe4a83148c8f6863b2efe09"
68
68
  }
@@ -263,7 +263,7 @@ export class ClarityMonitor extends BaseMonitor {
263
263
  return [...set]
264
264
  }
265
265
 
266
- async updateGasPrice({ gasPrice, baseFeePerGas }) {
266
+ async updateGasPrice({ gasPrice, baseGasPrice: baseFeePerGas }) {
267
267
  try {
268
268
  const feeData = await this.aci.getFeeConfig({ assetName: this.asset.name })
269
269
  const feeConfig = resolveGasPrices({
@@ -202,11 +202,25 @@ export class EthereumMonitor extends BaseMonitor {
202
202
  async updateGasPrice({ gasPrice, baseFeePerGas }) {
203
203
  try {
204
204
  const feeData = await this.aci.getFeeConfig({ assetName: this.asset.name })
205
+
206
+ const resolveBaseFeePerGas = () => {
207
+ if (!feeData.eip1559Enabled) {
208
+ return
209
+ }
210
+
211
+ if (baseFeePerGas === 0) {
212
+ // In some cases, web socker sends 0 baseFeePerGas!!
213
+ return this.server.getBaseFeePerGas().then((wei) => `${wei} wei`)
214
+ }
215
+
216
+ return `${fromHexToString(baseFeePerGas)} wei`
217
+ }
218
+
205
219
  const feeConfig = resolveGasPrices({
206
220
  asset: this.asset,
207
221
  feeData,
208
222
  gasPrice: `${fromHexToString(gasPrice)} wei`,
209
- baseFeePerGas: baseFeePerGas ? `${fromHexToString(baseFeePerGas)} wei` : undefined,
223
+ baseFeePerGas: await resolveBaseFeePerGas(),
210
224
  })
211
225
  await this.aci.updateFeeConfig({ assetName: this.asset.name, feeConfig })
212
226
  } catch (e) {