@exodus/ethereum-api 8.52.0 → 8.53.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,26 @@
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.53.1](https://github.com/ExodusMovement/assets/compare/@exodus/ethereum-api@8.53.0...@exodus/ethereum-api@8.53.1) (2025-09-30)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+
12
+ * fix: ws gateway audit fix (#6515)
13
+
14
+
15
+
16
+ ## [8.53.0](https://github.com/ExodusMovement/assets/compare/@exodus/ethereum-api@8.52.0...@exodus/ethereum-api@8.53.0) (2025-09-29)
17
+
18
+
19
+ ### Features
20
+
21
+
22
+ * feat: support delisted EVM assets (#6558)
23
+
24
+
25
+
6
26
  ## [8.52.0](https://github.com/ExodusMovement/assets/compare/@exodus/ethereum-api@8.51.0...@exodus/ethereum-api@8.52.0) (2025-09-26)
7
27
 
8
28
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/ethereum-api",
3
- "version": "8.52.0",
3
+ "version": "8.53.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",
@@ -66,5 +66,5 @@
66
66
  "type": "git",
67
67
  "url": "git+https://github.com/ExodusMovement/assets.git"
68
68
  },
69
- "gitHead": "cf881908a1cff88e98d2f9a7a3f29357474e3d0c"
69
+ "gitHead": "1793a11e058eff9b73525b29961ba044caa0d918"
70
70
  }
@@ -68,6 +68,7 @@ export const createAssetFactory = ({
68
68
  rpcBalanceAssetNames = [],
69
69
  supportsCustomFees: defaultSupportsCustomFees = false,
70
70
  useAbsoluteBalanceAndNonce = false,
71
+ delisted = false,
71
72
  }) => {
72
73
  assert(assetsList, 'assetsList is required')
73
74
  assert(providedFeeData || feeDataConfig, 'feeData or feeDataConfig is required')
@@ -189,6 +190,7 @@ export const createAssetFactory = ({
189
190
  signMessageWithSigner: true,
190
191
  supportsCustomFees,
191
192
  ...(supportsStaking && { staking: {} }),
193
+ ...(delisted && { delisted }),
192
194
  }
193
195
 
194
196
  const stakingAssetNames = Object.keys(stakingConfiguration)
@@ -89,6 +89,9 @@ export default class ClarityServer extends EventEmitter {
89
89
  for (const namespace of namespaces) {
90
90
  this.disconnectSocket(namespace)
91
91
  }
92
+
93
+ this.removeAllListeners('transaction')
94
+ this.removeAllListeners('feeUpdated')
92
95
  }
93
96
 
94
97
  // See https://www.jsonrpc.org/specification#response_object for details.
@@ -38,17 +38,21 @@ class WsGateway extends EventEmitter {
38
38
  _handlers = {
39
39
  message: ({ target, data }) => {
40
40
  if (target !== this.#socket) return
41
- const msg = JSON.parse(data)
41
+ try {
42
+ const msg = JSON.parse(data)
42
43
 
43
- if (Array.isArray(msg)) {
44
- for (const item of msg) {
45
- this.#handleMessage(item)
44
+ if (Array.isArray(msg)) {
45
+ for (const item of msg) {
46
+ this.#handleMessage(item)
47
+ }
48
+
49
+ return
46
50
  }
47
51
 
48
- return
52
+ this.#handleMessage(msg)
53
+ } catch (error) {
54
+ this.#logger.error('WS gateway on message error', { error })
49
55
  }
50
-
51
- this.#handleMessage(msg)
52
56
  },
53
57
  close: ({ target, code, reason }) => {
54
58
  if (target !== this.#socket) return
@@ -152,6 +156,7 @@ class WsGateway extends EventEmitter {
152
156
  * @param {Array<subscribeWalletAddresses>} subscriptions
153
157
  */
154
158
  subscribeWalletAddresses({ network, addresses }) {
159
+ assert(network, '"network" is required')
155
160
  const payload = []
156
161
 
157
162
  for (const address of addresses) {
@@ -244,6 +249,7 @@ class WsGateway extends EventEmitter {
244
249
 
245
250
  dispose(network, addresses) {
246
251
  this.unsubscribeWalletAddresses({ network, addresses })
252
+ this.removeAllListeners(`${network}:new_transaction`)
247
253
 
248
254
  if (this.#subscriptions.size > 0) {
249
255
  return
@@ -1,6 +1,7 @@
1
1
  import { BaseMonitor } from '@exodus/asset-lib'
2
2
  import { getAssetAddresses } from '@exodus/ethereum-lib'
3
3
  import lodash from 'lodash'
4
+ import assert from 'minimalistic-assert'
4
5
 
5
6
  import { executeEthLikeFeeMonitorUpdate } from '../fee-utils.js'
6
7
  import { fromHexToString } from '../number-utils.js'
@@ -238,8 +239,15 @@ export class ClarityMonitor extends BaseMonitor {
238
239
  async subscribeWalletAddresses() {
239
240
  const addressesByWalletAccount = await this.getReceiveAddressesByWalletAccount()
240
241
  Object.entries(addressesByWalletAccount).forEach(([walletAccount, addresses]) => {
241
- const address = String([...addresses][0]).toLowerCase() // Only check m/0/0
242
- this.server.connectTransactions({ walletAccount, address })
242
+ try {
243
+ const [rawAddress] = addresses
244
+ assert(rawAddress, 'rawAddress should be defined')
245
+
246
+ const address = String(rawAddress).toLowerCase() // Only check m/0/0
247
+ this.server.connectTransactions({ walletAccount, address })
248
+ } catch (e) {
249
+ this.logger.error(e)
250
+ }
243
251
  })
244
252
  }
245
253