We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The cosmos-extension-metamask wallet does not properly check if metamask is installed or not.
In the Leap metamask snap extension we properly check for the metamask window with
interface MetamaskWindow { ethereum?: { isMetaMask?: boolean; }; } export const isMetamaskInstalled: () => Promise<boolean> = async () => { if (typeof window === 'undefined') { return false; } const ethereum = (window as MetamaskWindow).ethereum; if (ethereum?.isMetaMask) { return true; } if (document.readyState === 'complete') { if (ethereum?.isMetaMask) { return true; } else { throw ClientNotExistError; } }
But in the cosmos-extension we do not
interface SnapWindow { cosmos?: CosmosSnap; } export const getSnapProviderFromExtension: () => Promise< CosmosSnap | undefined > = async () => { if (typeof window === 'undefined') { return void 0; } const cosmos = (window as SnapWindow).cosmos; if (cosmos) { return cosmos; } if (document.readyState === 'complete') { if (cosmos) { return cosmos; } else { throw ClientNotExistError; } }
Fix for this is in #517
The text was updated successfully, but these errors were encountered:
No branches or pull requests
ISSUE
The cosmos-extension-metamask wallet does not properly check if metamask is installed or not.
SUMMARY
In the Leap metamask snap extension we properly check for the metamask window with
But in the cosmos-extension we do not
Fix for this is in #517
The text was updated successfully, but these errors were encountered: