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: display Metamask warning only for extension/mobile wallets #5370

Merged
merged 3 commits into from
Feb 3, 2025

Conversation

shoom3301
Copy link
Collaborator

Summary

Fixes #5369

  1. Do not display the banner for wallets who expose isMetamask = true and only display it for Metamask browser extension
  2. Display the wallet for Metamask mobile wallet via WC (tested only with IOS wallet)

To Test

See above

@shoom3301 shoom3301 added the RELEASE Included in the release that is being closed label Feb 3, 2025
@shoom3301 shoom3301 requested review from a team February 3, 2025 12:34
@shoom3301 shoom3301 self-assigned this Feb 3, 2025
Copy link

vercel bot commented Feb 3, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
cowfi 🔄 Building (Inspect) Visit Preview Feb 3, 2025 2:46pm
explorer-dev 🔄 Building (Inspect) Visit Preview Feb 3, 2025 2:46pm
sdk-tools 🔄 Building (Inspect) Visit Preview Feb 3, 2025 2:46pm
swap-dev 🔄 Building (Inspect) Visit Preview Feb 3, 2025 2:46pm
widget-configurator 🔄 Building (Inspect) Visit Preview Feb 3, 2025 2:46pm
1 Skipped Deployment
Name Status Preview Updated (UTC)
cosmos ⬜️ Ignored (Inspect) Visit Preview Feb 3, 2025 2:46pm

Copy link
Contributor

@elena-zh elena-zh left a comment

Choose a reason for hiding this comment

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

Hey @shoom3301 , everything looks great besides 1 issue: there is no warning inside the MM integrated browser
image

@shoom3301
Copy link
Collaborator Author

@elena-zh fixed

Copy link
Contributor

@elena-zh elena-zh left a comment

Choose a reason for hiding this comment

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

Thank you!

* feat: forward provider meta info into widget

* feat: display Metamask warning in widget

* chore: fix METAMASK_WALLET_NAME_REGEX

* refactor: extract useWidgetProviderMetaInfo

* chore: fix isRabby
@shoom3301 shoom3301 merged commit abb5683 into main Feb 3, 2025
6 of 11 checks passed
@shoom3301 shoom3301 deleted the fix/metamask-banner-conditions branch February 3, 2025 14:46
@github-actions github-actions bot locked and limited conversation to collaborators Feb 3, 2025
*/
function useIsMetamaskMobileInjectedWallet(): boolean {
const walletProvider = useWalletProvider()
const rawProvider = walletProvider?.provider as any
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should not make use of as, if something we could use typescript type guards

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
RELEASE Included in the release that is being closed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants