@instadapp/avocado-base 0.0.75 → 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.
- package/components/metadata/CrossTransfer.vue +11 -3
- package/package.json +1 -1
- package/utils/network.ts +21 -21
|
@@ -20,9 +20,17 @@ const fromToken = asyncComputed(() => {
|
|
|
20
20
|
);
|
|
21
21
|
});
|
|
22
22
|
|
|
23
|
-
const
|
|
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,
|
|
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
|
-
{{
|
|
47
|
+
{{ formattedToAmount }}
|
|
40
48
|
<span class="uppercase">{{ fromToken?.symbol }}</span>
|
|
41
49
|
</span>
|
|
42
50
|
</div>
|
package/package.json
CHANGED
package/utils/network.ts
CHANGED
|
@@ -269,27 +269,27 @@ export const networks: Network[] = [
|
|
|
269
269
|
},
|
|
270
270
|
},
|
|
271
271
|
},
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
272
|
+
{
|
|
273
|
+
name: "Fuse",
|
|
274
|
+
chainId: 122,
|
|
275
|
+
zerionName: "fuse",
|
|
276
|
+
color: "#78d64b",
|
|
277
|
+
explorerUrl: "https://explorer.fuse.io",
|
|
278
|
+
get serverRpcUrl() {
|
|
279
|
+
return process.env?.FUSE_RPC_URL || this.params.rpcUrls[0];
|
|
280
|
+
},
|
|
281
|
+
usdcAddress: "",
|
|
282
|
+
balanceResolverAddress: "0xdF19Da523DA64bBE82eE0E4DFf00d676A8386474",
|
|
283
|
+
params: {
|
|
284
|
+
rpcUrls: ["https://fuse-mainnet.chainstacklabs.com"],
|
|
285
|
+
chainName: "Fuse",
|
|
286
|
+
nativeCurrency: {
|
|
287
|
+
decimals: 18,
|
|
288
|
+
name: "Fuse",
|
|
289
|
+
symbol: "fuse",
|
|
290
|
+
},
|
|
291
|
+
},
|
|
292
|
+
},
|
|
293
293
|
{
|
|
294
294
|
name: AVO_PROD_CHAIN_NAME,
|
|
295
295
|
chainId: AVO_PROD_CHAIN_ID,
|