@exodus/balances
Advanced tools
Comparing version 13.1.0 to 13.1.1
@@ -6,2 +6,8 @@ # Change Log | ||
## [13.1.1](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/balances@13.1.0...@exodus/balances@13.1.1) (2024-04-09) | ||
### Bug Fixes | ||
- don't recompute if asset already exist in balances ([#6410](https://github.com/ExodusMovement/exodus-hydra/issues/6410)) ([f7160cc](https://github.com/ExodusMovement/exodus-hydra/commit/f7160ccf90deb046a12f23f9f42bd78e74bb2859)) | ||
## [13.1.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/balances@13.0.1...@exodus/balances@13.1.0) (2024-04-09) | ||
@@ -8,0 +14,0 @@ |
@@ -85,2 +85,3 @@ import { isNumberUnit } from '@exodus/currency' | ||
this.#recompute = shareQueue(this.#recompute) | ||
this.#onAssetsChanged = shareQueue(this.#onAssetsChanged) | ||
this.#getBalancesForAssetSource = captureErrors({ | ||
@@ -235,4 +236,11 @@ fn: this.#getBalancesForAssetSource, | ||
#onAssetsChanged = async () => { | ||
// TODO: make this more efficient | ||
#onAssetsChanged = async (added) => { | ||
if ( | ||
added.every(({ name }) => | ||
this.#walletAccounts.every((walletAccount) => !!this.#balances?.[walletAccount]?.[name]) | ||
) | ||
) { | ||
return | ||
} | ||
this._logger.log('recomputing based on new assets list') | ||
@@ -239,0 +247,0 @@ this.#recompute() |
{ | ||
"name": "@exodus/balances", | ||
"version": "13.1.0", | ||
"version": "13.1.1", | ||
"description": "Tracks crypto balances across enabled wallet accounts.", | ||
@@ -61,3 +61,3 @@ "author": "Exodus Movement Inc.", | ||
}, | ||
"gitHead": "e3229e4313cd509df06eb7b689f29a7d257f82f2" | ||
"gitHead": "09df4e0ee6f7185f8d715c6db5a64f1e5a8efd76" | ||
} |
59957
979