-
Notifications
You must be signed in to change notification settings - Fork 45
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
feature: Add ADR 0008 option for opening Ledger wallet #761
base: master
Are you sure you want to change the base?
Conversation
MegaLinter status: ✅ SUCCESS
See errors details in artifact MegaLinter reports on CI Job page |
68ea3e5
to
0271de2
Compare
166ec41
to
ab06b8c
Compare
you need to bump snapshots and a few saga tests are failing |
16505a3
to
f2f6bca
Compare
Codecov Report
@@ Coverage Diff @@
## master #761 +/- ##
==========================================
- Coverage 88.24% 87.88% -0.36%
==========================================
Files 100 100
Lines 1693 1717 +24
Branches 338 341 +3
==========================================
+ Hits 1494 1509 +15
- Misses 199 208 +9
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
dd0747c
to
fdca15d
Compare
fdca15d
to
9f3bb9c
Compare
Task linked: CU-2gf4peq Add support to Oasis Wallet - Web |
"send": "Envoyer", | ||
"confirmSendingToValidator": { | ||
"title": "", | ||
"description": "" | ||
} |
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.
Empty translations show up nothing. Missing translations fallback to English.
public static mustGetPath(pathType: string, i: number) { | ||
switch (pathType) { | ||
case DerivationPathTypeAdr8: | ||
return [44, 474, i] | ||
case DerivationPathTypeLegacy: | ||
return [44, 474, 0, 0, i] | ||
} |
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.
Enum would be a better type
export enum DerivationPathType {
Adr8 = 'adr8',
Legacy = 'legacy',
}
public static mustGetPath(pathType: DerivationPathType, i: number) {
switch (pathType) {
case DerivationPathType.Adr8:
return [44, 474, i]
case DerivationPathType.Legacy:
return [44, 474, 0, 0, i]
}
@@ -34,7 +37,18 @@ const successOrThrow = (response: Response, message: string) => { | |||
} | |||
|
|||
export class Ledger { | |||
public static async enumerateAccounts(transport: Transport, count = 5) { | |||
public static mustGetPath(pathType: string, i: number) { |
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.
"must" is a bit odd. I'd just name it getPath
Fixes #760
Merge after #792 is implemented and show ADR8 option only when the user enables some "advanced" mode.
Depends on Ledger docs update oasisprotocol/docs#57