novasamatech / nova-spektr

Nova Spektr — All-in-one Polkadot desktop wallet supporting multisigs, staking, light clients, and more
https://novaspektr.io
Apache License 2.0
40 stars 16 forks source link

WalletConnect. Refresh lead to duplicates in database #2691

Open stepanLav opened 2 days ago

stepanLav commented 2 days ago

Description

When user perform a reconnect for WalletConnect added wallet it may lead to duplicates in database.

Example:

https://github.com/user-attachments/assets/d6b24470-0fed-4928-93d0-d86dcfbbc198

Steps to Reproduce

  1. Add WalletConnect wallet via NovaWallet
  2. Perform Reconnect flow a multiple times
    • Check database accounts table

Expected Behavior

After reconnect all accounts will be updated

Actual Behavior

Some times reconnect will lead to duplications in the table

Environment

https://github.com/novasamatech/nova-spektr/commit/3f0353542615436e4922356d1e6697cec74edcd5