threshold-network / token-dashboard

23 stars 24 forks source link

Fix Ledger Live use effect bug #701

Closed michalsmiarowski closed 9 months ago

michalsmiarowski commented 9 months ago

Fix bug that was introduced in https://github.com/threshold-network/token-dashboard/pull/655. The useRequestEthereumAccount hook that supposed to be used only in embed mode, was firing it's useEffect in the website where it set the empty account in the redux state. This prevented some functionality in the dApp to work properly. For example the Operator Mapping Card was not displayed when user connected the account on the Staking page.

The fix is adding isEmbed check for all useEffects related to ledger live app.

github-actions[bot] commented 9 months ago

Preview uploaded to https://preview.dashboard.test.threshold.network/fix-ledger-live-use-effect-bug/index.html.