@hyperix/hooks 0.2.2 → 0.2.3

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.
@@ -154,7 +154,7 @@ export function buildBalancesData(input) {
154
154
  const perpBalances = input.isUnifiedAccount
155
155
  ? []
156
156
  : buildPerpBalances(input.clearinghouseState, input.perpMarkets);
157
- const balances = [...perpBalances, ...spotBalances];
157
+ const balances = [...perpBalances, ...spotBalances].filter((balance) => balance.value !== 0);
158
158
  const rawSpotEquity = sumBy(balances.filter((balance) => balance.type === "spot"), (balance) => balance.value);
159
159
  const rawPerpEquity = sumBy(balances.filter((balance) => balance.type === "perp"), (balance) => balance.value);
160
160
  const tradingEquity = input.isUnifiedAccount
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hyperix/hooks",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",