@exodus/balances
Advanced tools
Comparing version 11.2.1 to 11.2.2
@@ -6,2 +6,9 @@ # Change Log | ||
## [11.2.2](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/balances@11.2.1...@exodus/balances@11.2.2) (2023-11-06) | ||
### Bug Fixes | ||
- **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)) | ||
- 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)) | ||
## [11.2.1](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/balances@11.2.0...@exodus/balances@11.2.1) (2023-10-30) | ||
@@ -8,0 +15,0 @@ |
{ | ||
"name": "@exodus/balances", | ||
"version": "11.2.1", | ||
"version": "11.2.2", | ||
"description": "Tracks crypto balances across enabled wallet accounts.", | ||
@@ -61,3 +61,3 @@ "author": "Exodus Movement Inc.", | ||
}, | ||
"gitHead": "305bc870c35c19b0cc8f520f93e5efa00f28d0d7" | ||
"gitHead": "1c23ddca93850c0a40da742a5cefd2e42b554356" | ||
} |
@@ -15,8 +15,7 @@ import { memoize } from 'lodash' | ||
for (const tx of txs) { | ||
const isUnconfirmed = tx.error || tx.pending || tx.confirmations <= 0 | ||
const isIncommingTX = tx.coinAmount.isPositive | ||
const isUnconfirmed = !tx.failed && tx.pending | ||
if (isUnconfirmed) { | ||
result = tx.coinAmount.isNegative | ||
? result.sub(tx.coinAmount) | ||
: result.add(tx.coinAmount) | ||
result = isIncommingTX ? result.add(tx.coinAmount) : result.sub(tx.coinAmount) | ||
} | ||
@@ -23,0 +22,0 @@ } |
38321
571