diff --git a/src/hooks/useContract.ts b/src/hooks/useContract.ts index 1c643279fd..8b6fa3c953 100644 --- a/src/hooks/useContract.ts +++ b/src/hooks/useContract.ts @@ -126,9 +126,12 @@ export function useTokenReadingContract(tokenAddress?: string, customChainId?: C } export function useWETHContract(customChainId?: ChainId): Contract | null { - const { chainId: walletChainId } = useActiveWeb3React() + const { chainId: walletChainId, account } = useActiveWeb3React() const chainId = customChainId || walletChainId - return useSigningContract(WETH[chainId].address, WETH_ABI) + const signContract = useSigningContract(WETH[chainId].address, WETH_ABI) + const readContract = useReadingContract(WETH[chainId].address, WETH_ABI) + + return account ? signContract : readContract } export function useArgentWalletDetectorContract(): Contract | null {