`options.connect.walletAppURL` must be explicitly specified or Sequence won't open
Opened this issue · 0 comments
matbour commented
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:
mathieu-bour/sequence-wallet-switch@explicit-wallet-url
(Vercel link), working perfectlymathieu-bour/sequence-wallet-switch@no-wallet-url
) (Vercel link), Sequence wallet does not open at all
Fix is trivial, the following line
wagmi-connector/src/sequence-connector.ts
Lines 32 to 39 in acff003
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 :)