Add createUri and createExternal (#96)

* Add createUri and createExternal

* Update signatures

* Expose uiSettings.availableCryptos
This commit is contained in:
Jaco Greeff
2019-03-19 10:15:25 +01:00
committed by GitHub
parent 9e1771bd78
commit 10d22e2b84
5 changed files with 64 additions and 21 deletions
+5 -1
View File
@@ -4,7 +4,7 @@
import store from 'store';
import { ENDPOINT_DEFAULT, ENDPOINTS, LANGUAGE_DEFAULT, LANGUAGES, UIMODE_DEFAULT, UIMODES, UITHEME_DEFAULT, UITHEMES } from './defaults';
import { CRYPTOS, ENDPOINT_DEFAULT, ENDPOINTS, LANGUAGE_DEFAULT, LANGUAGES, UIMODE_DEFAULT, UIMODES, UITHEME_DEFAULT, UITHEMES } from './defaults';
import { Options, SettingsStruct } from './types';
export class Settings implements SettingsStruct {
@@ -42,6 +42,10 @@ export class Settings implements SettingsStruct {
return ENDPOINTS;
}
get availableCryptos (): Options {
return CRYPTOS;
}
get availableLanguages (): Options {
return LANGUAGES;
}
+6
View File
@@ -11,6 +11,11 @@ const WSS_POLKADOT = 'wss://poc3-rpc.polkadot.io/';
const WSS_SUBSTRATE = 'wss://substrate-rpc.parity.io/';
const LANGUAGE_DEFAULT = 'default';
const CRYPTOS: Options = [
{ text: 'Edwards (ed25519)', value: 'ed25519' },
{ text: 'Schnorrkel (sr25519)', value: 'sr25519' }
];
const ENDPOINTS: Options = [
{ text: 'Alexander (Polkadot, hosted by Parity)', value: WSS_POLKADOT },
{ text: 'Dried Danta (Substrate, hosted by Parity)', value: WSS_SUBSTRATE },
@@ -44,6 +49,7 @@ const UIMODE_DEFAULT = !isPolkadot && window.location.host.indexOf('ui-light') !
: 'full';
export {
CRYPTOS,
ENDPOINT_DEFAULT,
ENDPOINTS,
LANGUAGE_DEFAULT,