-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add account derivation for mnemonic users #1853
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
b44438a
to
f1cebbd
Compare
f1cebbd
to
553c523
Compare
2365bb6
to
407c0da
Compare
407c0da
to
d9a7944
Compare
d9a7944
to
8695e6c
Compare
8695e6c
to
aacfb48
Compare
3996863
to
ca600ae
Compare
ca600ae
to
b325753
Compare
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.
Thank you, Oleg!
No issues with deriving logic, but please take a look at the comments regarding
+
buttongoToIndex
inDynamicDisclosure
{ | ||
files: ["*.ts", "*.tsx"], | ||
rules: { | ||
"import/no-unused-modules": "off", |
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.
Why this rule was changed?
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 rule fixes eslint, which currently does not work properly in the components
package (especially rule no-unused-modules)
size="sm" | ||
variant="ghost" | ||
/> | ||
<IconButton |
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 button should only be displayed for mnemonic accounts 🤔
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.
From the business perspective this button should open Add new account modal
for any accounts other than mnemonic
</Center> | ||
{accounts.map(account => { | ||
{accounts?.map(account => { |
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.
Why accounts can be null here?
Maybe empty groups can be filtered out to avoid this check?
expect(screen.getByText("First")).toBeVisible(); | ||
}); | ||
|
||
it("goToIndex should go back one step when is called with out-of-bounds index", async () => { |
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.
Why do we have both goBack & goToIndex with the same functionality?
Maybe we can remove goBack, or only allow goToIndex for correct indexes?
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'd personally prefer to only allow goToIndex for correct indexes to simplify methods logic
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.
Previously, this logic was implemented in the goBack
function, but after discussing it with @serjonya-trili, we decided to split this logic and keep both functions for different purposes - goBack for going directly to the previous disclosure and goToIndex for navigating through different disclosures
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.
We should check that account name is valid before proceeding (similar to RenameAccountModal check)
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.
we don't need these validation rules for this case since Account name field in this modal is optional.
Basically logic of NameAccountModal
is the same as for desktop's NameAccountDisplay
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.
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.
Password validation takes place inside useDeriveMnemonicAccount
. We don't know if the password is valid or not until we process useDeriveMnemonicAccount
expect(screen.getByTestId("master-password-modal")).toBeVisible(); | ||
}); | ||
}); | ||
|
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.
Maybe we can also check the case with incorrect password
And that after successful deriving, the modal will be closed
8292145
to
49e2501
Compare
49e2501
to
ef5238d
Compare
ef5238d
to
82d4fd1
Compare
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.
Thank you @OKendigelyan 👍
ce70f0f
to
65c9fdc
Compare
Proposed changes
Task link
Types of changes
Screenshots
Add the screenshots of how the app used to look like and how it looks now
Screen.Recording.2024-09-09.at.14.23.11.mov
Checklist