ghost-portal/packages/apps-config/src/settings/ss58.ts
Jaco Greeff 64299ebd29
Dev bump (#4012)
* Bump API/Common (esnext exports)

* Bump deps

* Adjust

* Bumps

* Bumps

* repository

* Update dev

* Remove Rococo (for the time being)

* script extension
2020-11-11 15:28:52 +01:00

28 lines
818 B
TypeScript

// Copyright 2017-2020 @polkadot/ui-settings authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { TFunction } from 'i18next';
import { Option } from './types';
import known from '@polkadot/networks';
// Definitions here are with the following values -
// info: the name of a logo as defined in ../logos, specifically in namedLogos
// text: The text you wish to display in the dropdown
// value: The actual ss5Format value (as registered)
export function createSs58 (t: TFunction): Option[] {
return [
{
info: 'default',
text: t('ss58.default', 'Default for the connected node', { ns: 'apps-config' }),
value: -1
},
...known.map(({ displayName, network, prefix }): Option => ({
info: network,
text: displayName,
value: prefix
}))
];
}