@rango-dev/widget-embedded 0.39.1-next.7 → 0.39.1-next.8

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.39.1-next.7",
3
+ "version": "0.39.1-next.8",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "source": "./src/index.ts",
@@ -54,4 +54,4 @@
54
54
  "publishConfig": {
55
55
  "access": "public"
56
56
  }
57
- }
57
+ }
@@ -545,28 +545,21 @@ export const createWalletsSlice: StateCreator<
545
545
  if (asset.blockchain === wallet.chain) {
546
546
  const token = get().findToken(asset);
547
547
 
548
- if (!!token) {
549
- const amount = balance.amount
550
- ? new BigNumber(balance.amount).shiftedBy(-balance.decimals)
551
- : ZERO;
552
-
553
- output.push({
554
- chain: wallet.chain,
555
- symbol: token.symbol,
556
- ticker: token.symbol,
557
- address: token.address,
558
- rawAmount: balance.amount,
559
- decimal: balance.decimals,
560
- amount: amount.toString(),
561
- logo: token.image,
562
- usdPrice: token.usdPrice,
563
- });
564
- } else {
565
- console.debug(
566
- "Looking for asset but it couldn't be found in tokens store. May not be provided in meta.'",
567
- asset
568
- );
569
- }
548
+ const amount = balance.amount
549
+ ? new BigNumber(balance.amount).shiftedBy(-balance.decimals)
550
+ : ZERO;
551
+
552
+ output.push({
553
+ chain: wallet.chain,
554
+ symbol: asset.symbol,
555
+ ticker: asset.symbol,
556
+ address: asset.address,
557
+ rawAmount: balance.amount,
558
+ decimal: balance.decimals,
559
+ amount: amount.toString(),
560
+ logo: token?.image || null,
561
+ usdPrice: token?.usdPrice || null,
562
+ });
570
563
  }
571
564
 
572
565
  return output;