@exodus/balances 11.2.1 → 11.2.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,13 @@
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
+ ## [11.2.2](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/balances@11.2.1...@exodus/balances@11.2.2) (2023-11-06)
7
+
8
+ ### Bug Fixes
9
+
10
+ - **balances:** do not count failed outgoing TX amount as unconfirmed ([#4624](https://github.com/ExodusMovement/exodus-hydra/issues/4624)) ([aa59950](https://github.com/ExodusMovement/exodus-hydra/commit/aa5995001a772f767dc077a5fed2ccf6b4efdd60))
11
+ - omit failed TX amount when calculating unconfirmed amount ([#4693](https://github.com/ExodusMovement/exodus-hydra/issues/4693)) ([f54c36d](https://github.com/ExodusMovement/exodus-hydra/commit/f54c36db046adffdc25100b386966a78bf542922))
12
+
6
13
  ## [11.2.1](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/balances@11.2.0...@exodus/balances@11.2.1) (2023-10-30)
7
14
 
8
15
  ### Bug Fixes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/balances",
3
- "version": "11.2.1",
3
+ "version": "11.2.2",
4
4
  "description": "Tracks crypto balances across enabled wallet accounts.",
5
5
  "author": "Exodus Movement Inc.",
6
6
  "license": "UNLICENSED",
@@ -58,5 +58,5 @@
58
58
  "jest": "^29.1.2",
59
59
  "redux": "^4.2.1"
60
60
  },
61
- "gitHead": "305bc870c35c19b0cc8f520f93e5efa00f28d0d7"
61
+ "gitHead": "1c23ddca93850c0a40da742a5cefd2e42b554356"
62
62
  }
@@ -12,12 +12,11 @@ const selectorFactory = (assetsSelector, createAssetSourceSelector) =>
12
12
  let result = asset.currency.ZERO
13
13
 
14
14
  for (const tx of txs) {
15
- const isUnconfirmed = tx.error || tx.pending || tx.confirmations <= 0
15
+ const isIncommingTX = tx.coinAmount.isPositive
16
+ const isUnconfirmed = !tx.failed && tx.pending
16
17
 
17
18
  if (isUnconfirmed) {
18
- result = tx.coinAmount.isNegative
19
- ? result.sub(tx.coinAmount)
20
- : result.add(tx.coinAmount)
19
+ result = isIncommingTX ? result.add(tx.coinAmount) : result.sub(tx.coinAmount)
21
20
  }
22
21
  }
23
22