Skip to content

Commit

Permalink
Hot fix json rpc
Browse files Browse the repository at this point in the history
  • Loading branch information
Corantin committed May 23, 2022
1 parent abe9001 commit d6dee35
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/react-app/src/contexts/wallet.context.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React, { useContext, useEffect, useMemo, useState } from 'react';
import { getProviderFromUseWalletId } from 'src/ethereum-providers';
import { useWallet, UseWalletProvider } from 'use-wallet';
import { getNetwork } from '../networks';
import { getUseWalletConnectors } from '../utils/web3.utils';
import { getDefaultProvider, getUseWalletConnectors } from '../utils/web3.utils';

export type WalletContextModel = {
walletAddress: string;
Expand Down Expand Up @@ -54,13 +54,13 @@ function WalletAugmented({ children }: Props) {
name: 'Wrong Network',
message: `Please select the ${name} network in your wallet (${connectorInfo?.name}) and try again.`,
});
return null;
return getDefaultProvider();
}

setActivationError(undefined);

if (!ethereum) {
return new EthersProviders.JsonRpcProvider(undefined, chainId);
return getDefaultProvider();
}

const ensRegistry = undefined; // network?.ensRegistry;
Expand Down

0 comments on commit d6dee35

Please sign in to comment.