Skip to content

Commit

Permalink
fix:walletconnect
Browse files Browse the repository at this point in the history
  • Loading branch information
constwz committed Dec 15, 2023
1 parent 66732ef commit 0f6f7d3
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 0f6f7d3

Please sign in to comment.