mirror of
https://github.com/pezkuwichain/pezkuwi-ui.git
synced 2026-06-17 23:01:03 +00:00
Add createUri and createExternal (#96)
* Add createUri and createExternal * Update signatures * Expose uiSettings.availableCryptos
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user