@exodus/ethereum-api 10.1.3 → 10.2.0

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,24 @@
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
+ ## [10.2.0](https://github.com/ExodusMovement/assets/compare/@exodus/ethereum-api@10.1.4...@exodus/ethereum-api@10.2.0) (2026-10-20)
7
+
8
+
9
+ ### Features
10
+
11
+ * **ethereum-api:** report the signed tx hash before broadcast ([#9019](https://github.com/ExodusMovement/assets/issues/9019)) ([96ae8c0](https://github.com/ExodusMovement/assets/commit/96ae8c0605181207279197d070a31a965f6f616c))
12
+
13
+
14
+
15
+ ## [10.1.4](https://github.com/ExodusMovement/assets/compare/@exodus/ethereum-api@10.1.3...@exodus/ethereum-api@10.1.4) (2026-10-17)
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * **ethereum-api:** keep no-history pending txs when the batch RPC fails ([#8992](https://github.com/ExodusMovement/assets/issues/8992)) ([4cfeb8c](https://github.com/ExodusMovement/assets/commit/4cfeb8c67c81d4e00eff5e22e4ed52da939030b5))
21
+
22
+
23
+
6
24
  ## [10.1.3](https://github.com/ExodusMovement/assets/compare/@exodus/ethereum-api@10.1.2...@exodus/ethereum-api@10.1.3) (2026-10-17)
7
25
 
8
26
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/ethereum-api",
3
- "version": "10.1.3",
3
+ "version": "10.2.0",
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",
@@ -65,5 +65,5 @@
65
65
  "type": "git",
66
66
  "url": "git+https://github.com/ExodusMovement/assets.git"
67
67
  },
68
- "gitHead": "52edb548f19b12c0dab06e436330b9f1363e9055"
68
+ "gitHead": "36fabbe45fe45079016a2652bd7fee0df025d8c3"
69
69
  }
@@ -105,12 +105,12 @@ export class EthereumNoHistoryMonitor extends BaseMonitor {
105
105
  }
106
106
 
107
107
  try {
108
- const responses = await this.server.sendBatchRequest(batch)
108
+ const responses = await this.server.sendBatchRequest(batch, { tolerant: true })
109
109
  const txIds = transactions.map(({ tx }) => tx.txId)
110
110
  return zipObject(txIds, responses)
111
111
  } catch (error) {
112
- console.warn({ error })
113
- return []
112
+ this.logger.warn('Batch RPC request failed, skipping pending tx checks', error)
113
+ return null
114
114
  }
115
115
  }
116
116
 
@@ -119,12 +119,15 @@ export class EthereumNoHistoryMonitor extends BaseMonitor {
119
119
  const txsToRemove = []
120
120
  const now = SynchronizedTime.now()
121
121
 
122
- if (isEmpty(pendingTransactions)) return { txsToUpdate, txsToRemove }
122
+ if (isEmpty(pendingTransactions) || !pendingTxsFromNode) return { txsToUpdate, txsToRemove }
123
123
 
124
124
  for (const { tx, assetName } of pendingTransactions) {
125
125
  const txFromNode = pendingTxsFromNode[tx.txId]
126
126
  const isConfirmed = Boolean(txFromNode?.blockHash)
127
- if (now - tx.date.getTime() > UNCONFIRMED_TX_LIMIT && !txFromNode) {
127
+ // Only `null` is the node's "unknown tx" verdict. `undefined` is a per-hash RPC error entry
128
+ // (no verdict), and without an indexer nothing would restore a tx removed on it.
129
+ const isUnknownToNode = txFromNode === null && now - tx.date.getTime() > UNCONFIRMED_TX_LIMIT
130
+ if (isUnknownToNode) {
128
131
  txsToRemove.push({
129
132
  tx,
130
133
  assetSource: { asset: assetName, walletAccount },
@@ -11,7 +11,13 @@ const txSendFactory = ({ assetClientInterface, createTx }) => {
11
11
  assert(assetClientInterface, 'assetClientInterface is required')
12
12
  assert(createTx, 'createTx is required')
13
13
 
14
- return async ({ asset, walletAccount, unsignedTx: providedUnsignedTx, ...legacyParams }) => {
14
+ return async ({
15
+ asset,
16
+ walletAccount,
17
+ unsignedTx: providedUnsignedTx,
18
+ onTxSigned,
19
+ ...legacyParams
20
+ }) => {
15
21
  const baseAsset = asset.baseAsset
16
22
 
17
23
  const { unsignedTx } = providedUnsignedTx
@@ -36,6 +42,8 @@ const txSendFactory = ({ assetClientInterface, createTx }) => {
36
42
  unsignedTx,
37
43
  walletAccount,
38
44
  })
45
+ // A caller that must find the tx after a lost broadcast response learns its hash before the network sees it.
46
+ await onTxSigned?.({ txId })
39
47
 
40
48
  try {
41
49
  await baseAsset.api.broadcastTx(rawTx.toString('hex'))
@@ -90,6 +98,7 @@ const txSendFactory = ({ assetClientInterface, createTx }) => {
90
98
  unsignedTx,
91
99
  walletAccount,
92
100
  }))
101
+ await onTxSigned?.({ txId })
93
102
 
94
103
  try {
95
104
  await baseAsset.api.broadcastTx(rawTx.toString('hex'))