connect icon indicating copy to clipboard operation
connect copied to clipboard

[WalletConnect] error using WC config in Connect

Open eric-stacks opened this issue 2 months ago • 1 comments

when trying to run the below snippet:

import { connect } from '@stacks/connect';

let response = await connect({
    walletConnect: {
      projectId: wcId,
    },
  });

or even...

import { WalletConnect, connect } from '@stacks/connect';

  let response = await connect({
    walletConnect: {
      projectId: wcId,
      networks: [
        WalletConnect.Networks.Stacks
      ],
    },
  });

i'm able to see the WalletConnect option appear in the Stacks Connect modal, but after clicking on 'connect', an error is thrown below:

>> WalletConnectProvider request error TypeError: Cannot use 'in' operator to search for 'network' in undefined

Image

looks like the error stems from n = "network" in s ? s.network : void 0; in the function getTargetCaipNetworkId

im running this locally on a Vitejs React app.

cc @jfstn @jannik-stacks

eric-stacks avatar Nov 13 '25 05:11 eric-stacks

Can i take this

dimka90 avatar Dec 13 '25 21:12 dimka90

Can i take this

please do! resolving this issue would help alot

eric-stacks avatar Dec 22 '25 19:12 eric-stacks