Manual installation
For sure installation requires some knowledge about React. We will be using the most popular web3 packages made for React library.
Add packages
npm install @web3-react/[email protected] @web3-react/[email protected]yarn add @web3-react/[email protected] @web3-react/[email protected]Connector setup
import { initializeConnector } from '@web3-react/core'
import { WalletConnect } from '@web3-react/walletconnect'
export const [metapro, metaproHooks] = initializeConnector<WalletConnect>(
(actions) =>
new WalletConnect({
actions,
treatModalCloseAsError: true,
options: {
bridge: 'https://tst-bridge.metaprotocol.one',
rpc: { [56]: "https://bsc-dataseed1.ninicoin.io" }
}
})
)Provider setup
A common issue with CRA apps in the newest versions is missing buffer. We need to install it manually and declare it in the main file.
Missing buffer can cause errors on WalletConnect integration.
https://github.com/WalletConnect/walletconnect-monorepo/issues/748

Connecting with built-in WalletConnect QRcode
Connecting with custom QRcode
Hook to connect eagerly on application start
Last updated