@exodus/ethereum-api 8.70.0 → 8.70.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.70.2](https://github.com/ExodusMovement/assets/compare/@exodus/ethereum-api@8.70.1...@exodus/ethereum-api@8.70.2) (2026-03-27)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+
12
+ * fix: use the monitor server for pending EVM tx drop checks (#7675)
13
+
14
+
15
+
16
+ ## [8.70.1](https://github.com/ExodusMovement/assets/compare/@exodus/ethereum-api@8.70.0...@exodus/ethereum-api@8.70.1) (2026-03-25)
17
+
18
+
19
+ ### Bug Fixes
20
+
21
+
22
+ * fix: ensure the pending nonce transaction filter only applies to pending transactions (#7651)
23
+
24
+
25
+
6
26
  ## [8.70.0](https://github.com/ExodusMovement/assets/compare/@exodus/ethereum-api@8.69.0...@exodus/ethereum-api@8.70.0) (2026-03-12)
7
27
 
8
28
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/ethereum-api",
3
- "version": "8.70.0",
3
+ "version": "8.70.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",
@@ -35,7 +35,7 @@
35
35
  "@exodus/ethereumjs": "^1.8.0",
36
36
  "@exodus/ethersproject-abi": "^5.4.2-exodus.2",
37
37
  "@exodus/fetch": "^1.3.0",
38
- "@exodus/models": "^12.13.0",
38
+ "@exodus/models": "^13.0.0",
39
39
  "@exodus/safe-string": "^1.4.0",
40
40
  "@exodus/simple-retry": "^0.0.6",
41
41
  "@exodus/solidity-contract": "^1.3.0",
@@ -69,5 +69,5 @@
69
69
  "type": "git",
70
70
  "url": "git+https://github.com/ExodusMovement/assets.git"
71
71
  },
72
- "gitHead": "bdd3658f4f045809a360f53f0fd2027293c00de8"
72
+ "gitHead": "959153b1ea9f3fc33398dd5a167c2c29c8af2df1"
73
73
  }
@@ -1,3 +1,4 @@
1
+ // eslint-disable-next-line @exodus/import/no-deprecated
1
2
  import { isNumberUnit } from '@exodus/currency'
2
3
  import { buffer2currency, createUnsignedTxFactory } from '@exodus/ethereum-lib'
3
4
  import { bufferToInt } from '@exodus/ethereumjs/util'
@@ -45,6 +46,7 @@ export const buildApproveTx = async ({
45
46
  }) => {
46
47
  assert(asset, 'expected asset')
47
48
  assert(feeData, 'expected feeData')
49
+ // eslint-disable-next-line @exodus/import/no-deprecated
48
50
  assert(isNumberUnit(approveAmount), 'expected approveAmount')
49
51
  assert(typeof spenderAddress === 'string', 'expected spenderAddress')
50
52
  assert(walletAccount, 'expected walletAccount')
@@ -281,7 +281,7 @@ export const createAssetFactory = ({
281
281
  createHistoryMonitor,
282
282
  createToken,
283
283
  createTx,
284
- createUnsignedTx,
284
+ createUnsignedTx, // @deprecated use createTx instead
285
285
  customFees: createCustomFeesApi({ baseAsset: asset }),
286
286
  defaultAddressPath,
287
287
  features,
package/src/ens/index.js CHANGED
@@ -1,3 +1,4 @@
1
+ // eslint-disable-next-line @exodus/import/no-deprecated
1
2
  import { hashSync } from '@exodus/crypto/hash'
2
3
  import { ABI } from '@exodus/ethereum-lib'
3
4
  import SolidityContract from '@exodus/solidity-contract'
@@ -24,6 +25,7 @@ function namehash(inputName) {
24
25
  const name = normalize(inputName)
25
26
  if (name) {
26
27
  for (const label of name.split('.').reverse()) {
28
+ // eslint-disable-next-line @exodus/import/no-deprecated
27
29
  node = hashSync('keccak256', [node, hashSync('keccak256', label, 'uint8')], 'buffer')
28
30
  }
29
31
  }
@@ -3,6 +3,7 @@ import {
3
3
  mapCurrency as defaultMapCurrency,
4
4
  modelToJSON,
5
5
  } from '@exodus/asset-lib/src/utils/index.js'
6
+ // eslint-disable-next-line @exodus/import/no-deprecated
6
7
  import { isNumberUnit } from '@exodus/currency'
7
8
  import lodash from 'lodash'
8
9
 
@@ -12,6 +13,7 @@ const PRE_EIP1559_UNIT_KEYS_GUARD = ['gasPrice']
12
13
  const EIP1559_UNIT_KEYS_GUARD = ['gasPrice', 'baseFeePerGas']
13
14
 
14
15
  export const bound = ({ val, multiplier, max, min }) => {
16
+ // eslint-disable-next-line @exodus/import/no-deprecated
15
17
  if (!isNumberUnit(val)) return val
16
18
 
17
19
  if (multiplier) {
@@ -1,8 +1,10 @@
1
+ // eslint-disable-next-line @exodus/import/no-deprecated
1
2
  import { isNumberUnit } from '@exodus/currency'
2
3
 
3
4
  export const DISABLE_BALANCE_CHECKS = '0x0'
4
5
 
5
6
  export function amountToCurrency({ asset, amount }) {
7
+ // eslint-disable-next-line @exodus/import/no-deprecated
6
8
  return isNumberUnit(amount) ? amount : asset.currency.parse(amount)
7
9
  }
8
10
 
@@ -143,7 +143,7 @@ export class ClarityMonitorV2 extends BaseMonitor {
143
143
  const statuses = params.refresh
144
144
  ? {}
145
145
  : await verifyRpcPendingTxStatusBatch({
146
- baseAsset: this.asset,
146
+ server: this.server,
147
147
  logger: this.logger,
148
148
  txIds,
149
149
  })
@@ -131,7 +131,7 @@ export class ClarityMonitor extends BaseMonitor {
131
131
  const statuses = params.refresh
132
132
  ? {}
133
133
  : await verifyRpcPendingTxStatusBatch({
134
- baseAsset: this.asset,
134
+ server: this.server,
135
135
  logger: this.logger,
136
136
  txIds,
137
137
  })
@@ -1,4 +1,4 @@
1
- const isPendingClarityTx = (tx) => tx?.blockNumber == null
1
+ export const isPendingClarityTx = (tx) => tx?.blockNumber == null
2
2
 
3
3
  const isSpamNote = (note) => {
4
4
  if (!note || typeof note !== 'object') return false
@@ -1,6 +1,6 @@
1
1
  import assert from 'minimalistic-assert'
2
2
 
3
- import { isSpamPendingTx } from './is-spam-pending-tx.js'
3
+ import { isPendingClarityTx, isSpamPendingTx } from './is-spam-pending-tx.js'
4
4
 
5
5
  // Converts the `pending` and `confirmed` transactions returned
6
6
  // by Clarity into a single contiguous array of transactions.
@@ -50,11 +50,12 @@ export const normalizeTransactionsResponse = async ({
50
50
  // HACK: If we were unable to determine the `pendingNonce`, then
51
51
  // allow send transactions through by default without
52
52
  // further validation.
53
- if (pendingNonce === null) return true
53
+ // NOTE: If the transaction is already confirmed, ignore RPC pending
54
+ // state comparison check since the RPC might be out-of-sync.
55
+ if (pendingNonce === null || !isPendingClarityTx(tx)) return true
54
56
 
55
- // NOTE: If the `tx` response contains pending transactions at
56
- // a nonce offset that's greater than what's considered
57
- // pending at the RPC, these transactions are no longer
57
+ // NOTE: If the pending `tx` has a nonce that's greater than
58
+ // what's considered pending at the RPC, it is no longer
58
59
  // viable and should be replaced.
59
60
  return nonce < pendingNonce
60
61
  }
@@ -124,7 +124,7 @@ export class EthereumMonitor extends BaseMonitor {
124
124
  const statuses = params.refresh
125
125
  ? {}
126
126
  : await verifyRpcPendingTxStatusBatch({
127
- baseAsset: this.asset,
127
+ server: this.server,
128
128
  logger: this.logger,
129
129
  txIds,
130
130
  })
@@ -26,16 +26,14 @@ function getTxStatus(rpcTx) {
26
26
  * Uses a single batch RPC call for efficiency and graceful error handling.
27
27
  *
28
28
  * @param {Object} params
29
- * @param {Object} params.baseAsset - The base asset to get the server from
29
+ * @param {Object} params.server - RPC server used to verify pending transactions
30
30
  * @param {Object} params.logger - Logger instance for info/debug output
31
31
  * @param {string[]} params.txIds - Array of transaction IDs/hashes to verify
32
32
  * @returns {Promise<Object<string, {status: 'confirmed' | 'pending' | 'dropped', blockNumber?: number}>>}
33
33
  */
34
- export default async function verifyRpcPendingTxStatusBatch({ baseAsset, logger, txIds }) {
34
+ export default async function verifyRpcPendingTxStatusBatch({ server, logger, txIds }) {
35
35
  if (txIds.length === 0) return {}
36
36
 
37
- const server = baseAsset.server
38
-
39
37
  // Build batch request
40
38
  const requests = txIds.map((txId) => server.getTransactionByHashRequest(txId))
41
39