-
Notifications
You must be signed in to change notification settings - Fork 45
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
Can our extension wallet connect to metamask? #2063
Comments
Does metamask inject
Does chrome have a config option for running ext in ext like
|
Does metamask support
|
Does iframe inside extension get metamask injection?
|
Can extension connect across wallet connect QR code?
|
Can ext wallet open a data URL popup, and that popup communicates with metamask?
|
Can ext wallet open an external site and use it as a proxy?
|
rainbowkit connect also requires more permissive CSP. Proxy site can have it less strict minimum:
try: diff --git a/extension/src/popup/popup.tsx b/extension/src/popup/popup.tsx
index 4909fa76..6b96b197 100644
--- a/extension/src/popup/popup.tsx
+++ b/extension/src/popup/popup.tsx
@@ -11,6 +11,24 @@ import 'locales/i18n'
import 'sanitize.css/sanitize.css'
import 'styles/main.css'
import { routes } from './routes'
+import { WagmiProvider } from 'wagmi'
+import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
+import { RainbowKitProvider } from '@rainbow-me/rainbowkit'
+
+import { getDefaultConfig } from '@rainbow-me/rainbowkit'
+import { sapphire } from 'wagmi/chains'
+import '@rainbow-me/rainbowkit/styles.css'
+
+export const config = getDefaultConfig({
+ appName: 'ROSE On-Ramp',
+ projectId: 'e3727c2e231abb0791d9cc90b55fb1e1',
+ chains: [sapphire],
+ ssr: false, // If your dApp uses server side rendering (SSR)
+ batch: {
+ multicall: false,
+ },
+})
+const queryClient = new QueryClient()
const container = document.getElementById('root') as HTMLElement
const root = createRoot(container!)
@@ -23,7 +41,13 @@ store.ready().then(() => {
<ThemeProvider>
<HelmetProvider>
<React.StrictMode>
- <RouterProvider router={router} />
+ <WagmiProvider config={config}>
+ <QueryClientProvider client={queryClient}>
+ <RainbowKitProvider>
+ <RouterProvider router={router} />
+ </RainbowKitProvider>
+ </QueryClientProvider>
+ </WagmiProvider>
</React.StrictMode>
</HelmetProvider>
</ThemeProvider> |
Benefit of opening an external site in tab or popup: |
If we want to do subcall withdrawal, we need to connect to evm extension wallets like metamask from inside https://chromewebstore.google.com/detail/ROSE%20Wallet/ppdadbejkmjnefldpcdjhnkpbjkikoip?hl=en
The text was updated successfully, but these errors were encountered: