File tree Expand file tree Collapse file tree 4 files changed +29
-6
lines changed Expand file tree Collapse file tree 4 files changed +29
-6
lines changed Original file line number Diff line number Diff line change 5
5
6
6
import { supportedApps } from '@zondax/ledger-substrate' ;
7
7
8
- import { ledgerApps } from './defaults.js' ;
8
+ import { prevLedgerRecord } from './defaults.js' ;
9
9
10
10
describe ( 'ledgerApps' , ( ) : void => {
11
- for ( const k of Object . keys ( ledgerApps ) ) {
11
+ for ( const k of Object . keys ( prevLedgerRecord ) ) {
12
12
it ( `${ k } is available in @zondax/ledger-substrate` , ( ) : void => {
13
13
expect (
14
14
supportedApps . find ( ( { name } ) =>
15
- name === ledgerApps [ k ]
15
+ name === prevLedgerRecord [ k ]
16
16
)
17
17
) . toBeDefined ( ) ;
18
18
} ) ;
Original file line number Diff line number Diff line change 1
1
// Copyright 2017-2024 @polkadot/hw-ledger authors & contributors
2
2
// SPDX-License-Identifier: Apache-2.0
3
3
4
- // These match up with the keys of the knownLedger object in the @polkadot /networks/defaults/ledger.ts
5
- // and maps to the known name in the @zondax /ledger-substrate/supported_apps package
6
- export const ledgerApps : Record < string , string > = {
4
+ // These map to the known name in the @zondax /ledger-substrate/supported_apps package
5
+ // but they do not reflect all ledger apps that are supported. Since ledger now has support for all
6
+ // substrate chains via the PolkadotGenericApp, any new chains that need ledger support can be added to
7
+ // `genericLedgerApps` below.
8
+ export const prevLedgerRecord : Record < string , string > = {
7
9
acala : 'Acala' ,
8
10
ajuna : 'Ajuna' ,
9
11
'aleph-node' : 'AlephZero' ,
@@ -45,3 +47,15 @@ export const ledgerApps: Record<string, string> = {
45
47
xxnetwork : 'XXNetwork' ,
46
48
zeitgeist : 'Zeitgeist'
47
49
} ;
50
+
51
+ // Any chains moving forward that are supported by the PolkadotGenericApp from ledger will input their names below.
52
+ export const genericLedgerApps = {
53
+ encointer : 'Encointer' ,
54
+ integritee : 'Integritee'
55
+ } ;
56
+
57
+ // These match up with the keys of the knownLedger object in the @polkadot /networks/defaults/ledger.ts
58
+ export const ledgerApps : Record < string , string > = {
59
+ ...prevLedgerRecord ,
60
+ ...genericLedgerApps
61
+ } ;
Original file line number Diff line number Diff line change @@ -56,6 +56,9 @@ export const knownGenesis: KnownGenesis = {
56
56
edgeware : [
57
57
'0x742a2ca70c2fda6cee4f8df98d64c4c670a052d9568058982dad9d5a7a135c5b'
58
58
] ,
59
+ encointer : [
60
+ '0x7dd99936c1e9e6d1ce7d90eb6f33bea8393b4bf87677d675aa63c9cb3e8c5b5b'
61
+ ] ,
59
62
enjin : [
60
63
'0xd8761d3c88f26dc12875c00d3165f7d67243d56fc85b4cf19937601a7916e5a9'
61
64
] ,
@@ -72,6 +75,10 @@ export const knownGenesis: KnownGenesis = {
72
75
'0x3d75507dd46301767e601265791da1d9cb47b6ebc94e87347b635e5bf58bd047' , // Snakenet Gen2
73
76
'0x0ed32bfcab4a83517fac88f2aa7cbc2f88d3ab93be9a12b6188a036bf8a943c2' // Snakenet Gen1
74
77
] ,
78
+ integritee : [
79
+ '0xcdedc8eadbfa209d3f207bba541e57c3c58a667b05a2e1d1e86353c9000758da' , // on Kusama
80
+ '0xe13e7af377c64e83f95e0d70d5e5c3c01d697a84538776c5b9bbe0e7d7b6034c' // on Polkadot
81
+ ] ,
75
82
'interlay-parachain' : [
76
83
'0xbf88efe70e9e0e916416e8bed61f2b45717f517d7f3523e33c7b001e5ffcbc72'
77
84
] ,
Original file line number Diff line number Diff line change @@ -19,10 +19,12 @@ export const knownLedger: KnownLedger = {
19
19
darwinia : 0x00000162 ,
20
20
'dock-mainnet' : 0x00000252 ,
21
21
edgeware : 0x0000020b ,
22
+ encointer : 0x000001b2 ,
22
23
enjin : 0x00000483 ,
23
24
equilibrium : 0x05f5e0fd ,
24
25
genshiro : 0x05f5e0fc ,
25
26
hydradx : 0x00000162 ,
27
+ integritee : 0x000007df ,
26
28
'interlay-parachain' : 0x00000162 ,
27
29
karura : 0x000002ae ,
28
30
khala : 0x000001b2 ,
You can’t perform that action at this time.
0 commit comments