threshold-network / token-dashboard

26 stars 25 forks source link

[Backport] Fix update handler validation #772

Closed michalsmiarowski closed 2 months ago

michalsmiarowski commented 2 months ago

Backport of: #769

Description

A bug was identified when connecting WalletConnect to Gnosis Safe via the wc pairing API: Shortly after a user connects their Gnosis Safe vault to the app, the connection was disconnected. Upon investigation, it was discovered that the connection between WalletConnect and Gnosis Safe was being interrupted due to the chainId format generated after connecting to Gnosis Safe. This triggered an update that disrupted the connection because of the way the update validation was structured in App.tsx.

Depending on the format in which the chainId is being passed by a 3rd party service, it may trigger an update. To handle these edge cases, this PR aims to add a more comprehensive validation method similarly to what has already been done previously in the commit @3ca72b93ca72b9.

Type of change

Notice

Issue (if applicable)

closes https://github.com/threshold-network/token-dashboard/issues/768

Pull Request Type

github-actions[bot] commented 2 months ago

Preview uploaded to https://preview.dashboard.test.threshold.network/backport-fix-wallet-connect-update-issue/index.html.