Prevent freezing UI rendering while pre-deriving accounts from mnemonic#1454
Merged
Prevent freezing UI rendering while pre-deriving accounts from mnemonic#1454
Conversation
🦙 MegaLinter status: ✅ SUCCESS
See detailed report in MegaLinter reports |
Deploying with
|
| Latest commit: |
d03bf1e
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://f4d689f9.oasis-wallet.pages.dev |
| Branch Preview URL: | https://lw-dont-freeze-mnemonic.oasis-wallet.pages.dev |
Codecov Report
@@ Coverage Diff @@
## master #1454 +/- ##
==========================================
+ Coverage 83.02% 83.10% +0.07%
==========================================
Files 154 154
Lines 4041 4042 +1
Branches 726 726
==========================================
+ Hits 3355 3359 +4
+ Misses 686 683 -3
Flags with carried forward coverage won't be shown. Click here to find out more.
|
buberdds
approved these changes
May 12, 2023
pro-wh
reviewed
May 12, 2023
| yield* setStep(ImportAccountsStep.LoadingAccounts) | ||
| // Pre-derive all pages of accounts so we don't need to store mnemonic in redux. | ||
| for (let i = 0; i < accountsPerPage * numberOfAccountPages; i++) { | ||
| const signer = yield* call(oasis.hdkey.HDKey.getAccountSigner, mnemonic, i) |
Contributor
There was a problem hiding this comment.
does the scheme allow us to do the expensive part once instead of 48 times?
Contributor
Author
There was a problem hiding this comment.
I didn't think of that :D
I currently doesn't https://github.com/oasisprotocol/oasis-sdk/blob/8039a75d7fe42dd8021317424cee073e60435f84/client-sdk/ts-web/core/src/hdkey.ts#L33-L35. it's fine
Contributor
There was a problem hiding this comment.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1453