From 2def3bcdcc021e01276a746625bd608c2fd9f323 Mon Sep 17 00:00:00 2001 From: rvcas Date: Thu, 26 Sep 2024 18:21:10 -0400 Subject: [PATCH] chore: actually show v2 tuna amount --- src/lib/components/ConnectButton.svelte | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/components/ConnectButton.svelte b/src/lib/components/ConnectButton.svelte index 6f51137..c6c96a9 100644 --- a/src/lib/components/ConnectButton.svelte +++ b/src/lib/components/ConnectButton.svelte @@ -68,12 +68,13 @@ const assetIdV2 = AssetId(V2_TUNA_POLICY_ID + TUNA_ASSET_NAME); const utxos = await $blaze.provider.getUnspentOutputsWithAsset($userAddress, assetId); + const utxosV2 = await $blaze.provider.getUnspentOutputsWithAsset($userAddress, assetIdV2); $v1TunaAmount = utxos.reduce((acc, u) => { return acc + (u.output().amount().multiasset()?.get(assetId) ?? 0n); }, 0n); - $v2TunaAmount = utxos.reduce((acc, u) => { + $v2TunaAmount = utxosV2.reduce((acc, u) => { return acc + (u.output().amount().multiasset()?.get(assetIdV2) ?? 0n); }, 0n); }