Skip to content

Commit

Permalink
[Issue-41] Integrate with Avail Ledger App
Browse files Browse the repository at this point in the history
  • Loading branch information
S2kael committed Apr 27, 2024
1 parent ff4b206 commit e53732c
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 0 deletions.
11 changes: 11 additions & 0 deletions packages/extension-koni-ui/src/constants/ledger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,17 @@ import { ChainInfoMap } from '@subwallet/chain-list';
import { ExtrinsicType, LedgerNetwork } from '@subwallet/extension-base/background/KoniTypes';

export const PredefinedLedgerNetwork: LedgerNetwork[] = [
{
accountName: 'Avail',
appName: 'Avail',
networkName: 'Avail network',
genesisHash: ChainInfoMap.availTuringTest.substrateInfo?.genesisHash || '0xd3d2f3a3495dc597434a99d7d449ebad6616db45e4e4f178f31cc6fa14378b70',
icon: 'substrate',
network: 'avail',
slug: ChainInfoMap.availTuringTest.slug,
isDevMode: true,
isEthereum: false
},
{
accountName: 'Polkadot',
appName: 'Polkadot',
Expand Down
11 changes: 11 additions & 0 deletions packages/extension-web-ui/src/constants/ledger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,17 @@ import { ChainInfoMap } from '@subwallet/chain-list';
import { ExtrinsicType, LedgerNetwork } from '@subwallet/extension-base/background/KoniTypes';

export const PredefinedLedgerNetwork: LedgerNetwork[] = [
{
accountName: 'Avail',
appName: 'Avail',
networkName: 'Avail network',
genesisHash: ChainInfoMap.availTuringTest.substrateInfo?.genesisHash || '0xd3d2f3a3495dc597434a99d7d449ebad6616db45e4e4f178f31cc6fa14378b70',
icon: 'substrate',
network: 'avail',
slug: ChainInfoMap.availTuringTest.slug,
isDevMode: true,
isEthereum: false
},
{
accountName: 'Polkadot',
appName: 'Polkadot',
Expand Down
12 changes: 12 additions & 0 deletions patches/@polkadot+hw-ledger+12.6.2.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/node_modules/@polkadot/hw-ledger/defaults.js b/node_modules/@polkadot/hw-ledger/defaults.js
index 9f06432..97efba8 100644
--- a/node_modules/@polkadot/hw-ledger/defaults.js
+++ b/node_modules/@polkadot/hw-ledger/defaults.js
@@ -37,5 +37,6 @@ export const ledgerApps = {
unique: 'Unique',
vtb: 'VTB',
xxnetwork: 'XXNetwork',
- zeitgeist: 'Zeitgeist'
+ zeitgeist: 'Zeitgeist',
+ avail: 'Avail'
};
Loading

0 comments on commit e53732c

Please sign in to comment.