@exodus/ethereum-lib 5.17.1 → 5.17.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,16 @@
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
+ ## [5.17.2](https://github.com/ExodusMovement/assets/compare/@exodus/ethereum-lib@5.17.1...@exodus/ethereum-lib@5.17.2) (2025-08-29)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+
12
+ * fix: add getAssetPendingNonExchangeTxs back (#6354)
13
+
14
+
15
+
6
16
  ## [5.17.1](https://github.com/ExodusMovement/assets/compare/@exodus/ethereum-lib@5.17.0...@exodus/ethereum-lib@5.17.1) (2025-08-19)
7
17
 
8
18
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/ethereum-lib",
3
- "version": "5.17.1",
3
+ "version": "5.17.2",
4
4
  "description": "Ethereum utils, such as for cryptography, address encoding/decoding, transaction building, etc.",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -50,5 +50,5 @@
50
50
  "type": "git",
51
51
  "url": "git+https://github.com/ExodusMovement/assets.git"
52
52
  },
53
- "gitHead": "73ae94b56198ed572b7d7dbc302b24f8ac8ed290"
53
+ "gitHead": "6f48374a175ff7ccea7549806d9f6d574d2f8693"
54
54
  }
@@ -12,6 +12,41 @@ const BumpType = {
12
12
  RBF: 2,
13
13
  }
14
14
 
15
+ // Legacy compatibility with wallets
16
+ export function getPendingNonExchangeTxs(activeWalletAccount, getTxLog, getIsExchangeTx) {
17
+ console.log('Using deprecated function getPendingNonExchangeTxs()')
18
+ return getAssetPendingNonExchangeTxs('ethereum', activeWalletAccount, getTxLog, getIsExchangeTx)
19
+ }
20
+
21
+ export function getAssetPendingNonExchangeTxs(
22
+ baseAssetName,
23
+ activeWalletAccount,
24
+ getTxLog,
25
+ getIsExchangeTx
26
+ ) {
27
+ const now = Date.now()
28
+ // check if the tx log even has pending transactions
29
+ const result = isQueuedPendingTx(
30
+ { data: { nonce: Number.MAX_SAFE_INTEGER } },
31
+ baseAssetName,
32
+ activeWalletAccount,
33
+ getTxLog,
34
+ now
35
+ )
36
+ if (!result) return []
37
+
38
+ const txLog = getTxLog(baseAssetName, activeWalletAccount)
39
+ const pendingNonExchangeTxs = []
40
+ for (let index = isQueuedPendingTx.minIndex; index < txLog.size; index++) {
41
+ const _tx = txLog.getAt(index)
42
+ if (_tx.pending && _tx.sent && !getIsExchangeTx(_tx.txId)) {
43
+ pendingNonExchangeTxs.push(_tx)
44
+ }
45
+ }
46
+
47
+ return pendingNonExchangeTxs
48
+ }
49
+
15
50
  function isQueuedPendingTx(tx, baseAssetName, activeWalletAccount, getTxLog, now) {
16
51
  const txLog = getTxLog(baseAssetName, activeWalletAccount)
17
52
  if (!txLog || txLog.size === 0) return false
@@ -1,6 +1,8 @@
1
1
  export {
2
2
  default as getCanAccelerateTxFactory,
3
3
  calculateBumpedGasPrice,
4
+ getPendingNonExchangeTxs,
5
+ getAssetPendingNonExchangeTxs,
4
6
  } from './get-can-accelerate-tx-factory.js'
5
7
 
6
8
  export { default as getIsEnoughBalanceToAccelerateSelectorFactory } from './get-is-enough-balance-to-accelerate-factory.js'