Skip to content

Commit

Permalink
fix default provider
Browse files Browse the repository at this point in the history
  • Loading branch information
H34D committed Nov 22, 2022
1 parent 2b4c9f2 commit 7c3ac91
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/common/helpers/provider/use-metamask.ts
Expand Up @@ -2,11 +2,13 @@ import { ethers } from 'ethers';
import { useCallback, useEffect } from 'react';
import { useMasa } from './use-masa';

const DEFAULT_RPC = 'https://rpc.ankr.com/eth_goerli'

//@ts-ignore
const provider = window?.ethereum
? //@ts-ignore
new ethers.providers.Web3Provider(window?.ethereum)
: new ethers.providers.JsonRpcProvider();
: new ethers.providers.JsonRpcProvider(DEFAULT_RPC);

export const useMetamask = () => {
const { setProvider, masa } = useMasa();
Expand Down

0 comments on commit 7c3ac91

Please sign in to comment.