shapeshift / web

ShapeShift Web
https://app.shapeshift.com
MIT License
157 stars 180 forks source link

feat: loading state for account import #6870

Closed woodenfurniture closed 1 month ago

woodenfurniture commented 1 month ago

Description

Adds loading state to account import in the manage accounts drawer.

Pull Request Type

Issue (if applicable)

closes #6849

Risk

High Risk PRs Require 2 approvals

Moderate risk. This is intended to prevent getting into invalid app state during account import, when opening and closing the account management drawer.

What protocols, transaction types or contract interactions might be affected by this PR?

Testing

Check that it's not possible to corrupt the state of the app by importing an account and opening/closing the account management drawer, and also rapidly adding/removing accounts.

Engineering

Operations

Screenshots (if applicable)

Original issue:

https://github.com/shapeshift/web/assets/125113430/c3dea3d3-b6cb-4cbc-9981-9e29ac882efa

Fixed:

https://github.com/shapeshift/web/assets/125113430/623aa190-9c89-410b-af76-566fd57028e0

woodenfurniture commented 1 month ago

Fixed in dbb7dcdbf93305e65d2baff6f38fb25d27911ff5 Note that it's still possible to get into an invalid state on ledger with the following steps: 1. click import accounts for a chain, add a new account 2. click done 3. immediately attempt to import accounts for the same chain 4. the list of accounts will be missing some rows

image