ed25519 w/ bip44 option (#436)

* ed25519 w/ bip44 option

* naming

* Rename Ledger option (no bip32-ed25519 compatible)
This commit is contained in:
Jaco Greeff
2021-01-28 15:10:03 +01:00
committed by GitHub
parent 82bd15b09c
commit 0f0bea2624
3 changed files with 16 additions and 2 deletions
+5 -1
View File
@@ -8,7 +8,7 @@ import store from 'store';
import { isUndefined } from '@polkadot/util'; import { isUndefined } from '@polkadot/util';
import { CAMERA, CAMERA_DEFAULT, CRYPTOS, CRYPTOS_ETH, ENDPOINT_DEFAULT, ENDPOINTS, ICON_DEFAULT, ICONS, LANGUAGE_DEFAULT, LEDGER_CONN, LEDGER_CONN_DEFAULT, LOCKING, LOCKING_DEFAULT, PREFIX_DEFAULT, PREFIXES, UIMODE_DEFAULT, UIMODES, UITHEME_DEFAULT, UITHEMES } from './defaults'; import { CAMERA, CAMERA_DEFAULT, CRYPTOS, CRYPTOS_ETH, CRYPTOS_LEDGER, ENDPOINT_DEFAULT, ENDPOINTS, ICON_DEFAULT, ICONS, LANGUAGE_DEFAULT, LEDGER_CONN, LEDGER_CONN_DEFAULT, LOCKING, LOCKING_DEFAULT, PREFIX_DEFAULT, PREFIXES, UIMODE_DEFAULT, UIMODES, UITHEME_DEFAULT, UITHEMES } from './defaults';
type ChangeCallback = (settings: SettingsStruct) => void; type ChangeCallback = (settings: SettingsStruct) => void;
type OnTypes = 'change'; type OnTypes = 'change';
@@ -106,6 +106,10 @@ export class Settings implements SettingsStruct {
return CRYPTOS_ETH; return CRYPTOS_ETH;
} }
public get availableCryptosLedger (): Option[] {
return CRYPTOS_LEDGER;
}
public get availableIcons (): Option[] { public get availableIcons (): Option[] {
return ICONS; return ICONS;
} }
@@ -28,3 +28,12 @@ export const CRYPTOS_ETH: Option[] = [
value: 'ethereum' value: 'ethereum'
} }
]; ];
export const CRYPTOS_LEDGER: Option[] = [
...CRYPTOS,
{
info: 'ed25519-ledger',
text: 'Ledger (ed25519, BIP32 derivation)',
value: 'ed25519-ledger'
}
];
+2 -1
View File
@@ -3,7 +3,7 @@
import type { Option } from '../types'; import type { Option } from '../types';
import { CRYPTOS, CRYPTOS_ETH } from './crypto'; import { CRYPTOS, CRYPTOS_ETH, CRYPTOS_LEDGER } from './crypto';
import { ENDPOINT_DEFAULT, ENDPOINTS } from './endpoints'; import { ENDPOINT_DEFAULT, ENDPOINTS } from './endpoints';
import { LEDGER_CONN, LEDGER_CONN_DEFAULT } from './ledger'; import { LEDGER_CONN, LEDGER_CONN_DEFAULT } from './ledger';
import { PREFIX_DEFAULT, PREFIXES } from './ss58'; import { PREFIX_DEFAULT, PREFIXES } from './ss58';
@@ -46,6 +46,7 @@ export {
CAMERA, CAMERA,
CRYPTOS, CRYPTOS,
CRYPTOS_ETH, CRYPTOS_ETH,
CRYPTOS_LEDGER,
ENDPOINT_DEFAULT, ENDPOINT_DEFAULT,
ENDPOINTS, ENDPOINTS,
ICON_DEFAULT, ICON_DEFAULT,