Skip to content

Commit

Permalink
Merge pull request #15 from bnb-chain/fix-walletconnect
Browse files Browse the repository at this point in the history
fix:walletconnect
  • Loading branch information
constwz authored Dec 15, 2023
2 parents 66732ef + 0f6f7d3 commit 3849bf0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/hooks/wallets/useOnboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export const useInitOnboard = () => {
const onboard = useStore()
const customRpc = useAppSelector(selectRpc)

useInitPairing()
//useInitPairing()

useEffect(() => {
if (configs.length > 0 && chain) {
Expand Down
18 changes: 9 additions & 9 deletions src/services/pairing/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ export const useInitPairing = () => {
const canConnect = !connector?.connected && !isConnecting
const isSupported = isPairingSupported(chain?.disabledWallets)

//useEffect(() => {
// const _pairingConnector = new WalletConnect({
// bridge: WC_BRIDGE,
// storageId: local.getPrefixedKey(PAIRING_MODULE_STORAGE_ID),
// clientMeta: getClientMeta(),
// })

//setPairingConnector(_pairingConnector)
//}, [])
useEffect(() => {
const _pairingConnector = new WalletConnect({
bridge: WC_BRIDGE,
storageId: local.getPrefixedKey(PAIRING_MODULE_STORAGE_ID),
clientMeta: getClientMeta(),
})

setPairingConnector(_pairingConnector)
}, [])

const createSession = useCallback(() => {
if (!canConnect || !chain || !isSupported || !onboard) {
Expand Down

0 comments on commit 3849bf0

Please sign in to comment.