Skip to content

Commit 17d088c

Browse files
committed
Create paths explicitly and use Keplr style numbering
1 parent 6df2375 commit 17d088c

File tree

1 file changed

+11
-4
lines changed
  • packages/ledger-amino/src/demo

1 file changed

+11
-4
lines changed

packages/ledger-amino/src/demo/web.ts

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { AccountData, makeCosmoshubPath, StdSignDoc } from "@cosmjs/amino";
2-
import { pathToString, stringToPath } from "@cosmjs/crypto";
1+
import { AccountData, StdSignDoc } from "@cosmjs/amino";
2+
import { pathToString, stringToPath, HdPath } from "@cosmjs/crypto";
33
import { toBase64 } from "@cosmjs/encoding";
44
import { Uint53 } from "@cosmjs/math";
55
import { assert } from "@cosmjs/utils";
@@ -26,8 +26,15 @@ function getTextAreaElement(id: string): HTMLTextAreaElement {
2626
return e;
2727
}
2828

29-
const accountNumbers = [0, 1, 2, 10];
30-
const paths = accountNumbers.map(makeCosmoshubPath);
29+
const paths: HdPath[] = [
30+
stringToPath("m/44'/118'/0'/0/0"),
31+
stringToPath("m/44'/118'/1'/0/0"),
32+
stringToPath("m/44'/118'/2'/0/0"),
33+
stringToPath("m/44'/118'/3'/0/0"),
34+
stringToPath("m/44'/118'/4'/0/0"),
35+
stringToPath("m/44'/118'/5'/0/0"),
36+
stringToPath("m/44'/118'/6'/0/0"),
37+
];
3138

3239
let accounts: readonly AccountData[] = [];
3340

0 commit comments

Comments
 (0)