lifinance/widget

Disconnect wallet still show "Swap" instead "Connect Wallet" in button

VuHoang2912 opened this issue · 6 comments

Hi LIFI Team
I am trying to integrate widget with using my Wallet management in walletConfig.
When I disconnect wallet and set walletManagement.signer = undefined but button still show "Swap" instead "Connect Wallet".

I think has logic issue at WalletProvider
https://github.com/lifinance/widget/blob/dev/packages/widget/src/providers/WalletProvider/WalletProvider.tsx

// keep account information up to date
  useEffect(() => {
    const updateAccount = async () => {
      const account = await extractAccountFromSigner(
        walletManagement?.signer ?? signer, // I think logic here is issue
      );
      setAccount(account);
    };
    updateAccount();
  }, [signer, walletManagement]);

*signer is getting from lifiWalletManagement not from my walletManagement.signer so that why account.isActive = true => It show "Swap" instead "Connect wallet" in button

Could you help to check? thanks

Hey There!
Thanks for notifying us on that issue. We will look into that ASAP and ping back here for any updates.

Hello @VuHoang2912 !
Quick update:

We have just released version 1.15.1 which contains a fix for the issue you have described. Please let me know if its working for you as well.

Hi @Addminus. version 1.15.1 is fixed the issue.it is working now. Thanks

msio commented

you have the issue on your current page https://jumper.exchange/swap too.

@Addminus please take a look.

The fix was released and deployed 🙂