-
Notifications
You must be signed in to change notification settings - Fork 105
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
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
...wswap-frontend/src/modules/tradeWidgetAddons/containers/MetamaskTransactionWarning/index.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this 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
@elena-zh fixed |
There was a problem hiding this 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
*/ | ||
function useIsMetamaskMobileInjectedWallet(): boolean { | ||
const walletProvider = useWalletProvider() | ||
const rawProvider = walletProvider?.provider as any |
There was a problem hiding this comment.
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
Summary
Fixes #5369
isMetamask = true
and only display it for Metamask browser extensionTo Test
See above