-
Notifications
You must be signed in to change notification settings - Fork 975
Adding in progress overlay/state for wallet recovery #13960
Conversation
Codecov Report
@@ Coverage Diff @@
## master #13960 +/- ##
==========================================
+ Coverage 56.52% 56.52% +<.01%
==========================================
Files 284 284
Lines 29302 29280 -22
Branches 4864 4865 +1
==========================================
- Hits 16562 16550 -12
+ Misses 12740 12730 -10
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When recovering by a file, if I cancel the file dialog, the recovery overlay still says 'recovering...'
app/common/state/ledgerState.js
Outdated
@@ -356,6 +356,7 @@ const ledgerState = { | |||
setRecoveryStatus: (state, status) => { | |||
state = validateState(state) | |||
const date = new Date().getTime() | |||
state = state.setIn(['about', 'preferences', 'recoveryInProgress'], false) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this be state.setIn([....], !status)
or will it always be false on setRecoveryStatus?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the setRecoveryStatus
method inside ledger state is called when the conclusion of the recovery has occurred, (success/fail) or when it is reset. In both cases recoveryInProgress
should be set to false as the attempted recovery is over.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please use aboutPreferencesState.setPreferencesProp
here as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please move this function setRecoveryStatus
into aboutPreferencesState
and use setPreferencesProp
for all 3 props. Thank you
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@NejcZdovc refactoring pushed
@jasonrsadler I will see what's going on with the cancellation 👍 |
@@ -58,12 +58,18 @@ class LedgerRecoveryContent extends ImmutableComponent { | |||
} | |||
} | |||
|
|||
onCancelRecovery (status) { | |||
this.onRecoveryOverlay(status) | |||
this.clearRecoveryStatus(status) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this call is not needed, because we already have it in onRecoveryOverlay
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please squash commits
345f20f
to
81523c7
Compare
squashed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
++
Adding in progress overlay/state for wallet recovery
Adding in progress overlay/state for wallet recovery
@ryanml should the |
@srirambv no it should not, it should only be showing when an actual recovery is in progress. Can you file issue? Thanks |
Fixes #11790
With 1ef48b8 an overlay is added to the recovery dialogue while the wallet recovery is in progress. Included in the overlay is a 'Cancel' button which will cancel the current recovery while it is in progress.
Here is the PR in action:
http://recordit.co/OYC6OgUjMX
Note: An artificial delay was introduced in to the backup for display purposes, in many instances the recovery is quite fast
This PR is currently marked as WIP. @bradleyrichter had an idea for a pretty slick implementation of text animation with a minimum propagation time. Example:The Recovery In Progress Overlay may include timed progress steps like:Reading recovery file….Processing wallet…Wallet Recovered! Go spend it!This will involve some refactoring/fail cases in the recovery state, and will involve some additional work from my end and perhaps some more UX oriented discussion. Further work will be pushed right to this PR.We will be tackling this in a separate issue :)
Submitter Checklist:
git rebase -i
to squash commits (if needed).Test Plan:
For current in progress incarnation
about:preferences#payments
vower obovoid menace tobogganist hoyle honoree pixel pestilently disconcertment sellable ruffing supervision zoroastrian based coparent slackened
Let me know if help is needed introducing a manual delay via the codebase for testing purposes.
Reviewer Checklist:
Tests