@instadapp/avocado-base 0.0.76 → 0.0.77

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.
@@ -20,9 +20,17 @@ const fromToken = asyncComputed(() => {
20
20
  );
21
21
  });
22
22
 
23
- const formattedFromAmount = computed(() =>
23
+ const toToken = asyncComputed(() => {
24
+ if (!props?.metadata?.toChainId) return null;
25
+
26
+ if (Array.isArray(tokens) && !tokens.length) return null;
27
+
28
+ return fetchTokenByAddress(props.metadata?.toToken, props?.metadata?.toChainId, tokens);
29
+ });
30
+
31
+ const formattedToAmount = computed(() =>
24
32
  formatDecimal(
25
- fromWei(props.metadata?.amount, fromToken?.value?.decimals).toFixed()
33
+ fromWei(props.metadata?.amount, toToken?.value?.decimals).toFixed()
26
34
  )
27
35
  );
28
36
  </script>
@@ -36,7 +44,7 @@ const formattedFromAmount = computed(() =>
36
44
  <span v-if="!compact" class="capitalize text-xs sm:text-sm">Cross-chain send</span>
37
45
  <span class="inline-flex gap-2.5 items-center">
38
46
  <img width="20" height="20" class="w-5 h-5" :src="fromToken?.logo_url" />
39
- {{ formattedFromAmount }}
47
+ {{ formattedToAmount }}
40
48
  <span class="uppercase">{{ fromToken?.symbol }}</span>
41
49
  </span>
42
50
  </div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instadapp/avocado-base",
3
- "version": "0.0.76",
3
+ "version": "0.0.77",
4
4
  "type": "module",
5
5
  "main": "./nuxt.config.ts",
6
6
  "types": "global.d.ts",