Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Connect to MetaMask with EIP-6963 TypeScript & React examples #1247

Merged
merged 24 commits into from
Apr 10, 2024
Merged
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
3c6b138
Format code on Connect to MetaMask Index page
httpJunkie Apr 8, 2024
4c3eb03
Add Web3Onboard link to list of 3rd Party libs that support EIP-6963
httpJunkie Apr 8, 2024
b84486f
First draft of TypeScript only example
httpJunkie Apr 8, 2024
09ff2be
Create a Vanilla TS and React + TS steps for connecting to Metamask w…
httpJunkie Apr 8, 2024
5116c47
Merge branch 'main' into connect-detect-metamask
httpJunkie Apr 8, 2024
2ad7e76
Update more of the Vanilla TypeScript example:
httpJunkie Apr 8, 2024
e2cce4a
add npm and bash commands
httpJunkie Apr 8, 2024
74040c8
Add Vanilla TypeSCript example as tabs
httpJunkie Apr 9, 2024
5a8fab4
Add import for tabs and tabItem theme
httpJunkie Apr 9, 2024
cf94760
Add React + TypeScript example
httpJunkie Apr 9, 2024
4a21cac
update tab info
httpJunkie Apr 9, 2024
453c5eb
remove semicolons for consistency
httpJunkie Apr 9, 2024
ddd0611
Update React + TypeScript
httpJunkie Apr 9, 2024
441d43c
first pass edits (WIP)
alexandratran Apr 10, 2024
71f4dfa
Simplify "why EIP-6963?"
Montoya Apr 10, 2024
8ad6faf
Expand EIP1193Provider explanation to include other wallets
Montoya Apr 10, 2024
32599ba
Merge branch 'main' into connect-detect-metamask
alexandratran Apr 10, 2024
8656b24
apply suggestions (still WIP)
alexandratran Apr 10, 2024
d9ab0ef
edits
alexandratran Apr 10, 2024
2a3761a
add setup step to react
alexandratran Apr 10, 2024
b97f85c
More active voice for Why EIP-6963
Montoya Apr 10, 2024
2c1ab6e
vanilla should be lowercase
Montoya Apr 10, 2024
2ff78b4
edits and apply suggestions
alexandratran Apr 10, 2024
7075ff7
lowercase vanilla in what's new
alexandratran Apr 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/whats-new.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ The latest major MetaMask documentation updates are listed by the month they wer
For a comprehensive list of recent product changes, visit the "Release Notes" section at the bottom
of the [MetaMask developer page](https://metamask.io/developer/).

## April 2024

- Updated [how to connect to MetaMask](/wallet/how-to/connect) with Vanilla TypeScript and React
TypeScript instructions.
([#1247](https://github.com/MetaMask/metamask-docs/pull/1247))

## March 2024

- Documented [Snaps `polyfills` configuration option](/snaps/reference/cli/options/#polyfills).
Expand Down
7 changes: 7 additions & 0 deletions wallet/concepts/wallet-interoperability.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ A web dapp can integrate with multiple installed browser wallets simultaneously
mechanism to the [`window.ethereum`](wallet-api.md#ethereum-provider-api) injected provider.
This mechanism is enabled by using the standardized interfaces defined by EIP-6963.

:::info Why EIP-6963?
[EIP-1193](https://eips.ethereum.org/EIPS/eip-1193) standardized the wallet interface, but it suffers
from unpredictable conflicts when multiple wallets are installed due to how the provider object is injected.
Montoya marked this conversation as resolved.
Show resolved Hide resolved
This can cause issues with wallet discovery, user onboarding, and connecting.
The wallet discovery mechanism introduced by EIP-6963 solves these issues.
:::

The following is a demo of the user experience of detecting multiple wallets, showing the data
provided from each installed wallet:

Expand Down
Loading
Loading