auth.andert.me/src/lib/Balance.svelte
2023-07-20 17:07:03 +02:00

16 lines
313 B
Svelte

<script>
import { fetchBalance } from '@wagmi/core';
import { onMount } from 'svelte';
export let balance;
onMount(async () => {
const getBalance = await fetchBalance({
address: '0x06B6BE47c86cfcDF3f77c0e17e7aD8af750782aE'
});
balance = getBalance.formatted;
});
</script>
<span>{balance}</span>