feat: add MetaMask Flask provider support for EIP-6963 #1192
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR extends our EIP-6963 provider detection to support MetaMask Flask alongside the main MetaMask provider.
Changes Overview
io.metamask.flask
)Technical Implementation
METAMASK_EIP_6369_PROVIDER_INFO.RDNS
to be an array that includes bothio.metamask
andio.metamask.flask
eip6963RequestProvider.ts
to useincludes()
for RDNS checkingImpact
This change is backwards compatible and doesn't require any migration steps. It simply adds support for detecting MetaMask Flask providers while maintaining existing functionality for regular MetaMask installations.
Note:
This is currently working when using Flask alone, there is no possibility to chose which MetaMask variant to connect to. Please disable the MetaMask extension when using Flask with the SDK.