This repository has been archived by the owner on Aug 6, 2020. It is now read-only.
This repository has been archived by the owner on Aug 6, 2020. It is now read-only.
Add a context factory with GSN fallback for onboarding #5
Open
Description
Add a factory and corresponding hook that creates a reasonable provider according to the following:
- If there is no injected provider (ie metamask), create a new key pair (or load one from local storage if found), and set up a GSN provider with it backed by a fallback provider (such as infura).
- If there is an injected provider, but without funds on the current network, create a new GSN provider that relies on the injected provider for signing (ie do not set a specific key, and let the RelayClient use eth_sign)
- If there is an injected provider with funds, use it.