Skip to content

Commit

Permalink
fix: don't use lucid server side
Browse files Browse the repository at this point in the history
  • Loading branch information
rvcas committed Apr 17, 2024
1 parent 6bcbd12 commit af83310
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/lib/components/ConnectButton.svelte
Expand Up @@ -5,7 +5,7 @@
import geroIcon from '$lib/assets/geroicon.png';
import fortunaIconBlack from '$lib/assets/fortunaIconBlack.png';
import { walletApi, v1TunaAmount, wallet, userAddress, translucent } from '$lib/store';
import { V1_TUNA_SUBJECT } from '$lib/constants';
import { V1_TUNA_POLICY_ID } from '$lib/constants';
let open = false;
Expand Down Expand Up @@ -59,7 +59,7 @@
const utxos = await $translucent.utxosAt($userAddress);
$v1TunaAmount = utxos.reduce((acc, u) => {
return acc + (u.assets[V1_TUNA_SUBJECT] ?? 0n);
return acc + (u.assets[V1_TUNA_POLICY_ID + fromText('TUNA')] ?? 0n);
}, 0n);
}
})();
Expand Down
4 changes: 0 additions & 4 deletions src/lib/constants.ts
@@ -1,5 +1 @@
import { fromText } from 'translucent-cardano';

export const V1_TUNA_POLICY_ID = '279f842c33eed9054b9e3c70cd6a3b32298259c24b78b895cb41d91a';
export const V1_TUNA_ASSET_NAME = fromText('TUNA');
export const V1_TUNA_SUBJECT = V1_TUNA_POLICY_ID + V1_TUNA_ASSET_NAME;

0 comments on commit af83310

Please sign in to comment.