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

I want to be able to connect to meta mask browser extension from a chrome extension tab loaded application #30

Open
javaspeak opened this issue Oct 5, 2023 · 0 comments

Comments

@javaspeak
Copy link

Greetings

I want to be able to connect to meta mask browser extension from a chrome extension tab loaded application.

However when I use a background script of the chrome extension to open my own extension app in a tab, it does not have access to the chrome namespace. The chrome variable is undefined.

i.e. in https://github.com/MetaMask/extension-provider/blob/master/index.js

this code will fail:

const metamaskPort = chrome.runtime.connect(currentMetaMaskId)

What I want to do is connect my wallet to the tab extension url which looks like this:

chrome-extension://oahhaapnfpkfnbgeopliehfgenifngde/tab.html#/register

i.e. I want the wallet connected to the chrome extension app and not the domain the content script happens to be on.

Thank you for your time

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

No branches or pull requests

1 participant