Skip to content
This repository was archived by the owner on May 16, 2024. It is now read-only.

Trying to connect with web3modal - is it possible? #34

Answered by dataexcess
dataexcess asked this question in Q&A
Discussion options

You must be logged in to vote

Bro I fixed it like this 😎 (providing the web3Modal object from the plugin with 'provide').

Plugin:

import { UseWagmiPlugin, configureChains, createConfig, mainnet, sepolia } from 'use-wagmi'
import { EthereumClient, w3mConnectors, w3mProvider } from '@web3modal/ethereum'
import { Web3Modal } from '@web3modal/html'

export default defineNuxtPlugin((nuxtApp) => {
    const config = useRuntimeConfig()
    const projectId = config.public.WALLETCONNECT_PROJECT_ID
    const chains = [mainnet, sepolia]

    const { publicClient } = configureChains(chains,
        [w3mProvider({ projectId })]
    )

    const web3config = createConfig({
        autoConnect: true,
        connectors: w3mConnector…

Replies: 8 comments 10 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@unicape
Comment options

Comment options

You must be logged in to vote
1 reply
@unicape
Comment options

Comment options

You must be logged in to vote
1 reply
@dataexcess
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by unicape
Comment options

You must be logged in to vote
5 replies
@ennioVisco
Comment options

@glitch-txs
Comment options

@unicape
Comment options

@glitch-txs
Comment options

@unicape
Comment options

Comment options

You must be logged in to vote
2 replies
@kleinpetr
Comment options

@reslear
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
6 participants
Converted from issue

This discussion was converted from issue #33 on July 13, 2023 03:33.