Created
April 8, 2022 21:15
-
-
Save nedrocks/4af0fd47d489a027f4bf582edbfb3b61 to your computer and use it in GitHub Desktop.
Use wallet connect 2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const getWeb3Modal = () => { | |
const providerOptions = { | |
injected: { | |
display: { | |
name: 'Metamask', | |
description: 'Connect with the provider in your Browser', | |
}, | |
package: null, | |
}, | |
walletconnect: { | |
package: WalletConnectProvider, | |
options: { | |
bridge: 'https://bridge.walletconnect.org', | |
//infuraId: process.env.REACT_PUBLIC_INFURA_ID, | |
}, | |
}, | |
}; | |
const web3Modal = new Web3Modal({ | |
network: 'mainnet', | |
cacheProvider: true, | |
disableInjectedProvider: false, | |
providerOptions, | |
}); | |
return web3Modal; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment