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

[Test] Patch in EIP-6963 support #19320

Closed
wants to merge 1 commit into from
Closed

[Test] Patch in EIP-6963 support #19320

wants to merge 1 commit into from

Conversation

rekmarks
Copy link
Member

Do not merge

@rekmarks rekmarks added the DO-NOT-MERGE Pull requests that should not be merged label May 27, 2023
@rekmarks rekmarks changed the title Patch in EIP-6963 support [Test] Patch in EIP-6963 support May 27, 2023
@@ -55,9 +58,21 @@ if (shouldInjectProvider()) {
target: CONTENT_SCRIPT,
});

initializeProvider({
const MetaMaskEIP6963ProviderInfo = {
walletId: 'io.metamask',
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be based on the build type. io.metamask for stable, io.metamask.flask for Flask etc.

walletId: 'io.metamask',
uuid: uuid(),
name: 'MetaMask',
icon: 'https://raw.githubusercontent.com/MetaMask/brand-resources/cb6fd847f3a9cc5e231c749383c3898935e62eab/SVG/metamask-fox.svg',
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm trying to find a better URL for this, but this works.

Comment on lines +74 to +77
announceProvider({
info: MetaMaskEIP6963ProviderInfo,
provider,
});
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Announce immediately after instantiating the provider object and setting it as window.ethereum.

@@ -34,7 +34,10 @@ cleanContextForImports();
import log from 'loglevel';
import { WindowPostMessageStream } from '@metamask/post-message-stream';
import { initializeProvider } from '@metamask/providers/dist/initializeInpageProvider';
import { v4 as uuid } from 'uuid';
Copy link
Member Author

@rekmarks rekmarks May 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will increase the size of the injected script by <12kb unless we tree shake.

@github-actions
Copy link
Contributor

This PR has been automatically marked as stale because it has not had recent activity in the last 60 days. It will be closed in 14 days. Thank you for your contributions.

@github-actions github-actions bot added the stale issues and PRs marked as stale label Jul 26, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Aug 9, 2023

This PR was closed because there has been no follow up activity in the last 14 days. Thank you for your contributions.

@github-actions github-actions bot closed this Aug 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DO-NOT-MERGE Pull requests that should not be merged stale issues and PRs marked as stale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant