FalconX-DEX / Falx-Support

3 stars 0 forks source link

When switch to another wallet address, it keeps caches and still shows the original wallet info #3

Closed jilam07 closed 5 months ago

jilam07 commented 5 months ago

Describe the bug When switch to another wallet address, it keeps caches and still shows the original wallet info

To Reproduce Steps to reproduce the behavior:

  1. Go to staking page
  2. Connect to wallet 1, which has staked FALX
  3. See the wallet 1 staked amount and history
  4. Switch to wallet 2 which doesn't stake any coin
  5. Web page automatically refreshes, showing connected to wallet 2
  6. However, it still shows wallet 1 staked amount and history, and can click Unstake for wallet 1 staked pool
  7. Need to click the disconnect button in FalxconX web page explicitly, then close all webpage tabs, then open a new tab to open the staking page and connect to wallet 2 again.
  8. After doing all these steps, it can show now wallet 2 staked amount and history correctly

Expected behavior After switching into wallet 2 and page refreshes, it should show wallet 2 staked amount and history without extra steps

Screenshots If applicable, add screenshots to help explain your problem.

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.

Jk0x0kJ commented 5 months ago

When the wallet is disconnected, listeners are added to clean the data. Upon reconnecting, the data related to the newly connected wallet is fetched automatically. Live with update #ref20241006

@jilam07