Skip to content

Commit

Permalink
fix(app): handle wallet disconnect
Browse files Browse the repository at this point in the history
  • Loading branch information
Swepool authored and cor committed Jun 8, 2024
1 parent 93c69a3 commit 7b43e5c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion app/src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ $: if (
address: $cosmosStore.rawAddress
})
}
$: if($cosmosStore.connectionStatus === 'disconnected') cosmosBalances = null
</script>

<main class="flex flex-col items-center w-full p-4 mt-16 gap-6">
Expand Down Expand Up @@ -98,7 +101,11 @@ $: if (
{#each $cosmosBalances as balance, index}
<div>
<h3 class="font-bold">{$cosmosChains[index].display_name}</h3>
<div class="text-xs font-mono text-muted-foreground">{rawToBech32($cosmosChains[index].addr_prefix, $cosmosStore.rawAddress)}</div>
{#if $cosmosChains[index]?.addr_prefix && $cosmosStore.rawAddress && $cosmosStore.rawAddress.length > 0}
<div class="text-xs font-mono text-muted-foreground">
{rawToBech32($cosmosChains[index].addr_prefix, $cosmosStore.rawAddress)}
</div>
{/if}
{#if balance.isLoading}
<p class="text-muted-foreground">Loading...</p>
{:else if balance.isError}
Expand Down

0 comments on commit 7b43e5c

Please sign in to comment.