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

[feature] After registering with useAppKit in Vue and using open, the modal box cannot pop up and the browser will display a warning #2904

Open
Suroc opened this issue Sep 23, 2024 · 0 comments

Comments

@Suroc
Copy link

Suroc commented Sep 23, 2024

Describe the solution you'd like

import { createAppKit, useAppKit, useAppKitTheme, useAppKitEvents } from '@reown/appkit/vue'
import { allChains, arbitrum, mainnet } from '@reown/appkit/networks'
import { WagmiAdapter } from '@reown/appkit-adapter-wagmi'
import { reconnect } from '@wagmi/core'
const projectId = import.meta.env.VITE_PROJECT_ID
const metadata = {
name: 'QMX',
description: 'QMX Liquid Market',
url: window.location.origin,
icons: ['https://avatars.githubusercontent.com/u/179229932']
}
const bscTestnet = {
id: 'eip155:97',
chainId: 97,
name: 'Suroc BNB Testnet',
currency: 'tBNB',
explorerUrl: 'https://testnet.bscscan.com',
rpcUrl: 'https://data-seed-prebsc-1-s1.bnbchain.org:8545',
chainNamespace: 'eip155'
}
allChains.unshift(bscTestnet)
const networks = [arbitrum, mainnet]
const wagmiAdapter = new WagmiAdapter({
ssr: true,
projectId,
networks
})
createAppKit({
adapters: [wagmiAdapter],
themeMode: themeStore.theme == 'dark' ? 'light' : 'dark', // 主题 dark | light
networks,
metadata,
projectId,
features: {
email: false, // 邮箱
socials: [], // 社交
analytics: true, // 分析
swaps: false, // 交换
onramp: false // onramp
},
featuredWalletIds: [
'8a0ee50d1f22f6651afcae7eb4253e52a3310b90af5daef78a8c4929a9bb99d4',
'c57ca95b47569778a828d19178114f4db188b89b763c899ba0be274e97267d96',
'20459438007b75f4f4acb98bf29aa3b800550309646d375da5fd4aac6c2a2c66'
]
})
walletModal.value = useAppKit()
walletTheme.value = useAppKitTheme()
walletEvents.value = useAppKitEvents()
console.log('初始钱包组件成功')
}

<el-button round @click="walletModal.open()">{{ $t('Header.Connect') }}

Calling walletModal. open() is invalid, browser warning after clicking
[Violation] Added non-passive event listener to a scroll-blocking event. Consider marking event handler as 'passive' to make the page more responsive. See

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant