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

Closed
Suroc opened this issue Sep 23, 2024 · 5 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

@Chralu
Copy link

Chralu commented Nov 20, 2024

Hi,

I'm encountering the same issue using those libraries :

"@wagmi/connectors": "^5.1.7",
"@wagmi/core": "^2.13.4",
"@web3modal/wagmi": "5.1.7",
"viem": "^2.20.0"

This happens when using androidx.webkit:webkit:1.12.0 on Android.

Chralu added a commit to archethic-foundation/wagmi_flutter_web that referenced this issue Nov 21, 2024
Fixes #76

This is a quick fix while issue is not fixed upstream (see reown-com/appkit#2904)
Chralu added a commit to archethic-foundation/wagmi_flutter_web that referenced this issue Nov 21, 2024
Fixes #76

This is a quick fix while issue is not fixed upstream (see reown-com/appkit#2904)
@arein
Copy link
Contributor

arein commented Dec 12, 2024

@Suroc @Chralu @danishfik We've fixed this meanwhile - you need to use 1.6.0 or later - sorry about the radio silence - curious - what are you building? :)

@arein arein closed this as completed Dec 12, 2024
@Chralu
Copy link

Chralu commented Dec 12, 2024

@arein thanks for the update 🙂

Is that fix applied to the legacy @web3modal lib ? (I cannot migrate to reown now).

@arein
Copy link
Contributor

arein commented Dec 12, 2024

@Chralu - no sorry :( - can you clarify why you can't migrate? also what app are you building?

@Chralu
Copy link

Chralu commented Dec 12, 2024

We wrote a @web3modal wrapper for Flutter web.
Reown rebranding and release happened a few days after our lib release 😅 We do not have time to rewrite it now.

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

3 participants