ghost-portal/packages/apps-config/src/settings/ss58.ts
Jaco Greeff a0cebb1dcb
Fix i18n generation (#3887)
* Fix i18n generation

* Include .ts in check

* Rebuild all
2020-10-16 17:07:39 +02:00

28 lines
822 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 default function create (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
}))
];
}