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

inject metamask inpage provider so unsafe-inline isn't required in the CSP on Firefox #416

Open
mrnerdhair opened this issue Feb 11, 2022 · 2 comments

Comments

@mrnerdhair
Copy link
Contributor

In hdwallet-metamask, use @metamask/providers (or maybe even the older metamask-inpage-provider -- see shapeshift/web#443 for some potentially-adaptable code) to try to instantiate a metamask provider for use in case detectEthereumProvider() can't find window.ethereum. This is relevant because Firefox applies page CSPs to code injected by extensions, which will block thing metamask's injected provider if we don't include the unsafe-inline options.

This may be better served as a change PRed to @metamask/detect-provider to resolve MetaMask/detect-provider#31.

(see also shapeshift/web#541)

@mrnerdhair
Copy link
Contributor Author

Needs #417.

@sudarno08
Copy link

Yes

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

No branches or pull requests

2 participants