-
Notifications
You must be signed in to change notification settings - Fork 4
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
feat: ledger support #200
feat: ledger support #200
Conversation
lucasgabrielgsp
commented
Oct 6, 2023
- implement ledger support
@@ -923,6 +959,86 @@ export class KeyringManager implements IKeyringManager { | |||
return trezorAccount; | |||
} | |||
|
|||
private async _createLedgerAccount( |
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.
private async _createLedgerAccount( | |
private async createLedgerAccount( |
index: +index, | ||
slip44, | ||
}); | ||
const accountAlreadyExists = |
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 suggest that each part of this can be one const and accountAlreadyExists
is the or of those consts. This way is really hard to read this variable
); | ||
|
||
const id = | ||
Object.values(accounts[KeyringAccountType.Ledger]).length < 1 |
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.
If you create a const for this in line 991 you can reuse it here