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

fix: metamask provider CSP workaround #739

Merged
merged 13 commits into from
Aug 1, 2022
Merged

Conversation

xgambitox
Copy link
Contributor

@xgambitox xgambitox commented Jul 27, 2022

Description

Inject Metamask provider when CSP blocks the extension from adding inline script code. If no wallet provider is found on a Firefox browser, Metamask provider injection will be executed and initialized by ourselves. Since Metamask is the most used wallet extension, we can assume this will work on most cases.

Related Issue

#738

Motivation and Context

  • Firefox blocks code injected by extensions when script-src CSP is enabled.

How Has This Been Tested?

  • Tested in preview build. Metamask Mobile app still doesn't work and need to be addressed separately.

@xgambitox xgambitox self-assigned this Jul 27, 2022
@aws-amplify-us-east-1
Copy link

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-739.d27dgpz01hmbvx.amplifyapp.com

@xgambitox xgambitox merged commit 1d43d11 into develop Aug 1, 2022
@xgambitox xgambitox deleted the fix/metamask-csp-workaround branch August 1, 2022 03:09
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.

1 participant