Skip to content

Conversation

@bakoushin
Copy link
Contributor

Description

Boilerplate for injected Ethereum provider.

Injects window.ethereum object with the following properties, required by EIP-1193:

  • request()
  • on()
  • removeListener()

Events

  • connect
  • disconnect

Those events are emitted when the mobile app loses or restores network connectivity. It is not related to connecting wallet to a dapp, despite the name. As per EIP-1193:

The Provider is said to be “connected” when it can service RPC requests to at least one chain.
The Provider is said to be “disconnected” when it cannot service RPC requests to any chain at all.

The connect event is also immediately emitted when the consumer subscribes to it (and there is network connectivity at the moment).

Requests

No requests supported yet. Any request is responded with "not implemented".

Test plan

Updated unit tests

Related issues

Backwards compatibility

Y

Network scalability

If a new NetworkId and/or Network are added in the future, the changes in this PR will:

  • Continue to work without code changes, OR trigger a compilation error (guaranteeing we find it when a new network is added)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants