Skip to content

Commit

Permalink
fix(bridge-ui): NETWORK_ERROR exception (#13562)
Browse files Browse the repository at this point in the history
  • Loading branch information
jscriptcoder authored Apr 6, 2023
1 parent f54242a commit a779cdb
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions packages/bridge-ui/src/components/form/SelectChain.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
import { errorToast, successToast } from '../Toast.svelte';
const toggleChains = async () => {
if (!$signer) {
errorToast('Please connect your wallet');
return;
}
try {
const chain = $fromChain === mainnetChain ? taikoChain : mainnetChain;
await switchNetwork({
Expand Down Expand Up @@ -43,10 +48,10 @@
{/if}
</div>

<button
on:click={toggleChains}
class="btn btn-square btn-sm toggle-chain"
disabled={!$signer}><ArrowRight size="16" /></button>
<button on:click={toggleChains} class="btn btn-square btn-sm toggle-chain">
<ArrowRight size="16" />
</button>

<div class="flex items-center w-2/5 justify-center">
{#if $toChain}
<svelte:component this={$toChain.icon} />
Expand Down

0 comments on commit a779cdb

Please sign in to comment.