Skip to content

Commit

Permalink
fix(bridge): ui and disconnect fixes (#7076)
Browse files Browse the repository at this point in the history
  • Loading branch information
shadab-taiko committed Jan 4, 2023
1 parent 4d06b48 commit b6345e2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/bridge-ui/src/components/AddressDropdown.svelte
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<script lang="ts">
import { disconnect as wagmiDisconnect } from '@wagmi/core'
import { onMount } from "svelte";
import { _ } from "svelte-i18n";
import { addressSubsection } from "../utils/addressSubsection";
Expand All @@ -7,7 +8,7 @@
import { getAddressAvatarFromIdenticon } from "../utils/addressAvatar";
import { LottiePlayer } from "@lottiefiles/svelte-lottie-player";
import { ethers, Signer } from "ethers";
import { errorToast } from "../utils/toast";
import { errorToast, successToast } from "../utils/toast";
import { ClipboardDocument, Power } from "svelte-heros-v2";
import { slide } from "svelte/transition";
import { fromChain } from "../store/chain";
Expand Down Expand Up @@ -44,10 +45,12 @@
async function copyToClipboard(clip: string) {
await navigator.clipboard.writeText(clip);
successToast('Address copied to clipboard');
}
async function disconnect() {
try {
await wagmiDisconnect();
signer.set(null);
} catch (e) {
console.error(e);
Expand Down

0 comments on commit b6345e2

Please sign in to comment.