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 provider detection to use wallet_getSnaps #528

Merged
merged 3 commits into from
Jan 30, 2025

Conversation

Mrtenz
Copy link
Member

@Mrtenz Mrtenz commented Jan 30, 2025

This change only affects staging. It replaces wallet_getAllSnaps with wallet_getSnaps when detecting the Ethereum provider (window.ethereum). wallet_getAllSnaps is allowlisted based on the origin, but the staging URL is not on this allowlist. We can use wallet_getSnaps to reliably detect if the provider supports Snaps though, and this works in the staging environment as well.

@Mrtenz Mrtenz requested a review from a team as a code owner January 30, 2025 11:18
Copy link
Contributor

github-actions bot commented Jan 30, 2025

Commit 6ec82cc3e037343fb0dc87121670867465f183cb successfully pushed to staging website:

https://metamask.github.io/snaps-directory-staging/pr/528/

@Mrtenz Mrtenz merged commit 50eb10f into main Jan 30, 2025
19 checks passed
@Mrtenz Mrtenz deleted the mrtenz/provider-detection branch January 30, 2025 11:44
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.

None yet

2 participants