@exodus/ethereum-api 8.53.0 → 8.53.2
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.2](https://github.com/ExodusMovement/assets/compare/@exodus/ethereum-api@8.53.1...@exodus/ethereum-api@8.53.2) (2025-10-01)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
* fix: change Polygon staking delegate default to not wait for confirmation (#6595)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
## [8.53.1](https://github.com/ExodusMovement/assets/compare/@exodus/ethereum-api@8.53.0...@exodus/ethereum-api@8.53.1) (2025-09-30)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Bug Fixes
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
* fix: ws gateway audit fix (#6515)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
6
26
|
## [8.53.0](https://github.com/ExodusMovement/assets/compare/@exodus/ethereum-api@8.52.0...@exodus/ethereum-api@8.53.0) (2025-09-29)
|
|
7
27
|
|
|
8
28
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exodus/ethereum-api",
|
|
3
|
-
"version": "8.53.
|
|
3
|
+
"version": "8.53.2",
|
|
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": "
|
|
69
|
+
"gitHead": "890149adb5b7fe3119024435d31ea3bce79d155c"
|
|
70
70
|
}
|
|
@@ -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
|
-
|
|
41
|
+
try {
|
|
42
|
+
const msg = JSON.parse(data)
|
|
42
43
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
if (Array.isArray(msg)) {
|
|
45
|
+
for (const item of msg) {
|
|
46
|
+
this.#handleMessage(item)
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
return
|
|
46
50
|
}
|
|
47
51
|
|
|
48
|
-
|
|
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
|
|
@@ -68,7 +68,7 @@ export function createPolygonStakingService({
|
|
|
68
68
|
return address.toLowerCase()
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
-
async function delegate({ walletAccount, amount, feeData, waitForConfirmation =
|
|
71
|
+
async function delegate({ walletAccount, amount, feeData, waitForConfirmation = false } = {}) {
|
|
72
72
|
const [delegatorAddress, { asset, stakingApi }] = await Promise.all([
|
|
73
73
|
getDelegatorAddress({ walletAccount }),
|
|
74
74
|
createStakingApi(),
|
|
@@ -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
|
-
|
|
242
|
-
|
|
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
|
|