@rango-dev/widget-embedded 0.37.1-next.1 → 0.37.1-next.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rango-dev/widget-embedded",
3
- "version": "0.37.1-next.1",
3
+ "version": "0.37.1-next.2",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "source": "./src/index.ts",
@@ -280,7 +280,10 @@ export function resetConnectedWalletState(
280
280
 
281
281
  export const calculateWalletUsdValue = (balances: BalanceState) => {
282
282
  const total = Object.values(balances).reduce((prev, balance) => {
283
- return balance.usdValue ? prev.plus(balance.usdValue) : prev;
283
+ const formattedBalance = formatBalance(balance);
284
+ return formattedBalance?.usdValue
285
+ ? prev.plus(formattedBalance.usdValue)
286
+ : prev;
284
287
  }, new BigNumber(ZERO));
285
288
 
286
289
  return numberWithThousandSeparator(total.toString());