@exodus/activity-txs 4.6.1 → 4.6.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,12 @@
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
+ ## [4.6.2](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/activity-txs@4.6.1...@exodus/activity-txs@4.6.2) (2025-01-31)
7
+
8
+ ### Bug Fixes
9
+
10
+ - fix: invalidate order by amount for rbf tx (#11303)
11
+
6
12
  ## [4.6.1](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/activity-txs@4.6.0...@exodus/activity-txs@4.6.1) (2025-01-31)
7
13
 
8
14
  ### Bug Fixes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/activity-txs",
3
- "version": "4.6.1",
3
+ "version": "4.6.2",
4
4
  "description": "The activity-txs feature",
5
5
  "author": "Exodus Movement, Inc.",
6
6
  "repository": {
@@ -62,5 +62,5 @@
62
62
  "publishConfig": {
63
63
  "access": "public"
64
64
  },
65
- "gitHead": "eb3daffdda5739434a5dace47368b6af03f3ff68"
65
+ "gitHead": "08d6376bfe012cebb59c6715f8e848f308617523"
66
66
  }
@@ -8,12 +8,23 @@ const EMPTY = Object.freeze([])
8
8
  const groupTxsWithSameOrder = ({ txs, orderSet, isIndexless }) => {
9
9
  if (!orderSet) return txs.map((tx) => ({ tx, type: 'tx' }))
10
10
 
11
- const getOrder = (tx) => orderSet.getByTxId(tx.txId)
11
+ const getOrder = (tx) => {
12
+ const foundOrder = orderSet.getByTxId(tx.txId)
13
+ const isBatchedTx = tx.coinName === 'bitcoin' && tx.data.sent?.[tx.data.sentIndex]
14
+ const isValidTx =
15
+ isBatchedTx && foundOrder.fromAmount
16
+ ? tx.coinAmount.abs().equals(foundOrder.fromAmount)
17
+ : true
18
+
19
+ return isValidTx ? foundOrder : undefined
20
+ }
21
+
12
22
  const exchangeByOrderId = new Map()
13
23
  const result = []
14
24
 
15
25
  for (const tx of txs) {
16
26
  const order = getOrder(tx)
27
+
17
28
  if (isIndexless && order) {
18
29
  // Orders are the source of truth for indexless swaps.
19
30
  // Skip this tx and add it later as exchanged.