Skip to content

Commit

Permalink
wagmi workaround with faucet switching for metamask
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberhorsey committed Dec 22, 2022
1 parent a2efd10 commit 78f9c36
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/bridge-ui/src/components/ERC20Faucet.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import { Funnel } from "svelte-heros-v2";
import MintableERC20 from "../constants/abi/MintableERC20";
import { fromChain } from "../store/chain";
import { switchNetwork } from "@wagmi/core";
import { fetchSigner, switchNetwork } from "@wagmi/core";
import { CHAIN_MAINNET } from "../domain/chain";
import Tooltip from "./Tooltip.svelte";
import TooltipModal from "./modals/TooltipModal.svelte";
Expand All @@ -24,6 +24,9 @@
await switchNetwork({
chainId: CHAIN_MAINNET.id,
});
const wagmiSigner = await fetchSigner();
signer.set(wagmiSigner);
}
const contract = new ethers.Contract(
HORSE.addresses[0].address,
Expand Down

0 comments on commit 78f9c36

Please sign in to comment.