From d6dee35cd69873776a69218d63913dc99bb8bde9 Mon Sep 17 00:00:00 2001 From: Corantin Noll Date: Mon, 23 May 2022 16:41:15 -0400 Subject: [PATCH] Hot fix json rpc --- packages/react-app/src/contexts/wallet.context.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/react-app/src/contexts/wallet.context.tsx b/packages/react-app/src/contexts/wallet.context.tsx index 625cfe2e..b621ecd1 100644 --- a/packages/react-app/src/contexts/wallet.context.tsx +++ b/packages/react-app/src/contexts/wallet.context.tsx @@ -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; @@ -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;