@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
package/src/utils/wallets.ts
CHANGED
|
@@ -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
|
-
|
|
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());
|