Addresses several state corruption issues related to import accounts drawer in account management, namely state being rendered for the previously opened chain.
Key changes:
Migrates the account import queries to useInfiniteQuery in order to simplify state management
Resets component state when a different chain is being managed
Uses an actually unique key for account rows (instead of account number which is shared across different chains)
Pull Request Type
[x] :bug: Bug fix (Non-breaking Change: Fixes an issue)
Description
Addresses several state corruption issues related to import accounts drawer in account management, namely state being rendered for the previously opened chain.
Key changes:
useInfiniteQuery
in order to simplify state managementPull Request Type
Issue (if applicable)
NA
Risk
Low risk.
Testing
Check that navigating to different chains in the "import accounts" drawer renders the correct toggled state of the accounts.
Engineering
Operations
Screenshots (if applicable)
Demo showing corrected state where toggles are actually representative of chain being managed:
https://github.com/shapeshift/web/assets/125113430/e20f0b9c-cc6b-4dc7-ba23-5d147af39c9e