Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(bridge-ui): Eth fix #475

Merged
merged 13 commits into from
Dec 23, 2022
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
2 changes: 1 addition & 1 deletion packages/bridge-ui/src/components/form/BridgeForm.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
let addr = $token.addresses.find(
(t) => t.chainId === $fromChain.id
).address;
if (!addr || addr === "0x00") {
if ($token.symbol !== ETH.symbol && (!addr || addr === "0x00")) {
const srcChainAddr = $token.addresses.find(
(t) => t.chainId === $toChain.id
).address;
Expand Down