0xsequence/wagmi-connector

`options.connect.walletAppURL` must be explicitly specified or Sequence won't open

Opened this issue · 0 comments

I just upgraded to @0xsequence/wagmi-connector v2.1.0, and I could not make the Sequence wallet open with my previous config. After some research, I found that the issue was solved by explicitly specifying options.connect.walletAppURL to SequenceConnector constructor:

const sequenceConnector = new SequenceConnector({
  chains,
  options: {
    defaultNetwork: chain.id,
    connect: {
      app: 'Demo',
      walletAppURL: 'https://sequence.app', // We should NOT have to explicitly specify the Sequence Wallet URL
    },
  },
});

I made a minimal reproduction repository that showcases this issue:

Fix is trivial, the following line

super({ chains, options })
this.provider = sequence.initWallet({
defaultNetwork: options?.defaultNetwork,
transports: {
walletAppURL: options?.connect.walletAppURL,
},
})

must be replaced by:

    super({ chains, options })
	
    this.provider = sequence.initWallet({
      defaultNetwork: options?.defaultNetwork,
      transports: {
        walletAppURL: options?.connect.walletAppURL ?? 'https://sequence.app', // Default value for walletAppURL
      },
    })

Happy to submit the associated PR :)