Skip to content

[WalletConnect] error using WC config in Connect #474

@eric-stacks

Description

@eric-stacks

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions