Skip to content

Commit

Permalink
add window.ethereum check
Browse files Browse the repository at this point in the history
  • Loading branch information
codenamejason committed Jun 10, 2024
1 parent bd35c76 commit 41100d1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/grant-explorer/src/features/api/AlloWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ function AlloWrapper({ children }: { children: JSX.Element | JSX.Element[] }) {
const chainID = chain?.id;

const backend = useMemo(() => {
if (!window.ethereum) return null;
const web3Provider = new providers.Web3Provider(window.ethereum, chain?.id);
const signer = web3Provider.getSigner(address);
const chainIdSupported = chainID ? isChainIdSupported(chainID) : false;
Expand Down

0 comments on commit 41100d1

Please sign in to comment.