    context.poll();
    return (): void => {
      context.stopPoll();
    };
  }, [context]);

  return context;
}

export function useWeb3Injected(options?: Web3ContextOptions): Web3Context | undefined {
  const [provider] = useState((): Provider | undefined => providers.tryInjected());
  if (!provider) return undefined;
  return useWeb3Context(provider, options);