diff --git a/web/public/index.html b/web/public/index.html index aa069f27..f66871aa 100644 --- a/web/public/index.html +++ b/web/public/index.html @@ -24,7 +24,7 @@ work correctly both with client-side routing and a non-root public URL. Learn how to configure a non-root public URL by running `npm run build`. --> - React App + Wormhole Demonstration UI diff --git a/web/src/components/TransferProposals.tsx b/web/src/components/TransferProposals.tsx index 97ac3cbc..2d4addbe 100644 --- a/web/src/components/TransferProposals.tsx +++ b/web/src/components/TransferProposals.tsx @@ -13,6 +13,11 @@ import {PublicKey, Transaction} from "@solana/web3.js"; import KeyContext from "../providers/KeyContext"; import ClientContext from "../providers/ClientContext"; +// @ts-ignore +if (window.ethereum === undefined) { + alert("Please install the MetaMask extension before using this experimental demo web UI"); +} + // @ts-ignore window.ethereum.enable(); // @ts-ignore diff --git a/web/src/pages/Assistant.tsx b/web/src/pages/Assistant.tsx index 426c7df4..240a9765 100644 --- a/web/src/pages/Assistant.tsx +++ b/web/src/pages/Assistant.tsx @@ -16,6 +16,10 @@ import * as spl from "@solana/spl-token"; import BN from "bn.js" import {SlotContext} from "../providers/SlotContext"; +// @ts-ignore +if (window.ethereum === undefined) { + alert("Please install the MetaMask extension before using this experimental demo web UI"); +} const {Step} = Steps; diff --git a/web/src/pages/Transfer.tsx b/web/src/pages/Transfer.tsx index c591e942..b3f99691 100644 --- a/web/src/pages/Transfer.tsx +++ b/web/src/pages/Transfer.tsx @@ -17,6 +17,10 @@ import {FormInstance} from "antd/lib/form"; import SplBalances from "../components/SplBalances"; import TransferProposals from "../components/TransferProposals"; +// @ts-ignore +if (window.ethereum === undefined) { + alert("Please install the MetaMask extension before using this experimental demo web UI"); +} // @ts-ignore window.ethereum.enable();