sei-protocol/sei-js

[SEI-6101] Even I changed wallet, it uses autoConnect wallet when I try to submit transaction.

Closed this issue · 1 comments

Hi @SeiTeam

I wrapped app with SeiWalletProvider and pass "compass" for autoConnect wallet. so it would be connected compass wallet automatically.
But I have available multiple wallets on dapp. so I need to change wallet to leap one. even I changed leap wallet, when I try to submit transaction, it uses "compass" walllet.

import { SUPPORTED_WALLETS } from "@sei-js/core";
import { SeiWalletProvider } from "@sei-js/react";

...
<SeiWalletProvider
        chainConfiguration={{
          chainId: chainId,
          restUrl: restUrl,
          rpcUrl: customRpcUrl,
        }}
        wallets={SUPPORTED_WALLETS}
        autoConnect="compass"
      >
        {children}
</SeiWalletProvider>

How can I change wallet?

const { connectedWallet } = useWallet();
if I console connectedWallet, it shows still "compass" wallet cause I passed "compass" for autoConnect param.

Here are chainId, restUrl and rpcUrl:

const chainId="atlantic-2"
const restUrl="https://rest.atlantic-2.seinetwork.io/"
const rpcUrl="https://rpc.atlantic-2.seinetwork.io/"

What's the solution? Thanks in advance!

SEI-6101

Unable to reproduce, please create a codepen to reproduce if anyone finds this issue again.