From 1bd86377629092e23caafa5e03a4e205684f37e3 Mon Sep 17 00:00:00 2001 From: Jaco Date: Mon, 10 May 2021 11:08:05 +0300 Subject: [PATCH] Fix chain ordering (alphabetical) (#5248) * Fix chain ordering (alpahbetical) * Split relays * Split live relays * Ordering * Adjust first with spacer --- packages/apps-config/src/api/constants.ts | 2 + packages/apps-config/src/endpoints/index.ts | 20 ++++- .../apps-config/src/endpoints/production.ts | 23 +---- .../src/endpoints/productionRelayKusama.ts | 32 +++++++ .../src/endpoints/productionRelayPolkadot.ts | 32 +++++++ .../src/endpoints/productionRelays.ts | 16 ++++ packages/apps-config/src/endpoints/testing.ts | 85 ++++++++----------- ...testingRococo.ts => testingRelayRococo.ts} | 85 +++++++++---------- .../src/endpoints/testingRelayWestend.ts | 34 ++++++++ .../src/endpoints/testingRelays.ts | 16 ++++ packages/apps-config/src/settings/types.ts | 1 + packages/apps/src/Endpoints/Group.tsx | 8 +- packages/apps/src/Endpoints/index.tsx | 2 +- packages/apps/src/Endpoints/types.ts | 1 + 14 files changed, 234 insertions(+), 123 deletions(-) create mode 100644 packages/apps-config/src/endpoints/productionRelayKusama.ts create mode 100644 packages/apps-config/src/endpoints/productionRelayPolkadot.ts create mode 100644 packages/apps-config/src/endpoints/productionRelays.ts rename packages/apps-config/src/endpoints/{testingRococo.ts => testingRelayRococo.ts} (95%) create mode 100644 packages/apps-config/src/endpoints/testingRelayWestend.ts create mode 100644 packages/apps-config/src/endpoints/testingRelays.ts diff --git a/packages/apps-config/src/api/constants.ts b/packages/apps-config/src/api/constants.ts index fd869be7e1..fe003d564e 100644 --- a/packages/apps-config/src/api/constants.ts +++ b/packages/apps-config/src/api/constants.ts @@ -22,3 +22,5 @@ export const POLKADOT_GENESIS = getGenesis('polkadot'); export const POLKADOT_DENOM_BLOCK = new BN(1248328); export const ROCOCO_GENESIS = '0x1611e1dbf0405379b861e2e27daa90f480b2e6d3682414a80835a52e8cb8a215'; + +export const WESTEND_GENESIS = '0xe143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e'; diff --git a/packages/apps-config/src/endpoints/index.ts b/packages/apps-config/src/endpoints/index.ts index a0c3077193..590e7776f7 100644 --- a/packages/apps-config/src/endpoints/index.ts +++ b/packages/apps-config/src/endpoints/index.ts @@ -6,8 +6,9 @@ import type { LinkOption } from '../settings/types'; import { createCustom, createDev, createOwn } from './development'; import { createProduction } from './production'; +import { createProductionRelays } from './productionRelays'; import { createTesting } from './testing'; -import { createRococo } from './testingRococo'; +import { createTestingRelays } from './testingRelays'; export { CUSTOM_ENDPOINT_KEY } from './development'; @@ -17,11 +18,12 @@ export function createWsEndpoints (t: TFunction): LinkOption[] { { isDisabled: false, isHeader: true, - text: t('rpc.header.live', 'Live networks', { ns: 'apps-config' }), + isSpaced: true, + text: t('rpc.header.live.relay', 'Live relays & parachains', { ns: 'apps-config' }), textBy: '', value: '' }, - ...createProduction(t), + ...createProductionRelays(t), { isDisabled: false, isHeader: true, @@ -29,7 +31,16 @@ export function createWsEndpoints (t: TFunction): LinkOption[] { textBy: '', value: '' }, - ...createRococo(t), + ...createTestingRelays(t), + { + isDisabled: false, + isHeader: true, + isSpaced: true, + text: t('rpc.header.live', 'Live networks', { ns: 'apps-config' }), + textBy: '', + value: '' + }, + ...createProduction(t), { isDisabled: false, isHeader: true, @@ -42,6 +53,7 @@ export function createWsEndpoints (t: TFunction): LinkOption[] { isDevelopment: true, isDisabled: false, isHeader: true, + isSpaced: true, text: t('rpc.header.dev', 'Development', { ns: 'apps-config' }), textBy: '', value: '' diff --git a/packages/apps-config/src/endpoints/production.ts b/packages/apps-config/src/endpoints/production.ts index 8fd325387d..24f0937fc6 100644 --- a/packages/apps-config/src/endpoints/production.ts +++ b/packages/apps-config/src/endpoints/production.ts @@ -14,30 +14,9 @@ import { expandEndpoints } from './util'; // text: The text to display on the dropdown // value: The actual hosted secure websocket endpoint +// alphabetical based on chain name export function createProduction (t: TFunction): LinkOption[] { return expandEndpoints(t, [ - // fixed, polkadot - { - dnslink: 'polkadot', - info: 'polkadot', - text: t('rpc.polkadot.parity', 'Polkadot', { ns: 'apps-config' }), - providers: { - Parity: 'wss://rpc.polkadot.io', - OnFinality: 'wss://polkadot.api.onfinality.io/public-ws', - 'Patract Elara': 'wss://polkadot.elara.patract.io' - } - }, - { - dnslink: 'kusama', - info: 'kusama', - text: t('rpc.kusama.parity', 'Kusama', { ns: 'apps-config' }), - providers: { - Parity: 'wss://kusama-rpc.polkadot.io', - OnFinality: 'wss://kusama.api.onfinality.io/public-ws', - 'Patract Elara': 'wss://kusama.elara.patract.io' - } - }, - // alphabetical based on chain name { dnslink: 'centrifuge', info: 'centrifuge', diff --git a/packages/apps-config/src/endpoints/productionRelayKusama.ts b/packages/apps-config/src/endpoints/productionRelayKusama.ts new file mode 100644 index 0000000000..54e6eda6f2 --- /dev/null +++ b/packages/apps-config/src/endpoints/productionRelayKusama.ts @@ -0,0 +1,32 @@ +// Copyright 2017-2021 @polkadot/apps-config authors & contributors +// SPDX-License-Identifier: Apache-2.0 + +import type { TFunction } from 'i18next'; +import type { EndpointOption } from './types'; + +import { KUSAMA_GENESIS } from '../api/constants'; + +/* eslint-disable sort-keys */ + +// The available endpoints that will show in the dropdown. For the most part (with the exception of +// Polkadot) we try to keep this to live chains only, with RPCs hosted by the community/chain vendor +// info: The chain logo name as defined in ../ui/logos/index.ts in namedLogos (this also needs to align with @polkadot/networks) +// text: The text to display on the dropdown +// value: The actual hosted secure websocket endpoint +export function createKusama (t: TFunction): EndpointOption { + return { + dnslink: 'kusama', + genesisHash: KUSAMA_GENESIS, + info: 'kusama', + text: t('rpc.kusama.parity', 'Kusama', { ns: 'apps-config' }), + providers: { + Parity: 'wss://kusama-rpc.polkadot.io', + OnFinality: 'wss://kusama.api.onfinality.io/public-ws', + 'Patract Elara': 'wss://kusama.elara.patract.io' + }, + linked: [ + // parachains with id, see Rococo + // alphabetical based on chain name + ] + }; +} diff --git a/packages/apps-config/src/endpoints/productionRelayPolkadot.ts b/packages/apps-config/src/endpoints/productionRelayPolkadot.ts new file mode 100644 index 0000000000..9db5329d0e --- /dev/null +++ b/packages/apps-config/src/endpoints/productionRelayPolkadot.ts @@ -0,0 +1,32 @@ +// Copyright 2017-2021 @polkadot/apps-config authors & contributors +// SPDX-License-Identifier: Apache-2.0 + +import type { TFunction } from 'i18next'; +import type { EndpointOption } from './types'; + +import { POLKADOT_GENESIS } from '../api/constants'; + +/* eslint-disable sort-keys */ + +// The available endpoints that will show in the dropdown. For the most part (with the exception of +// Polkadot) we try to keep this to live chains only, with RPCs hosted by the community/chain vendor +// info: The chain logo name as defined in ../ui/logos/index.ts in namedLogos (this also needs to align with @polkadot/networks) +// text: The text to display on the dropdown +// value: The actual hosted secure websocket endpoint +export function createPolkadot (t: TFunction): EndpointOption { + return { + dnslink: 'polkadot', + genesisHash: POLKADOT_GENESIS, + info: 'polkadot', + text: t('rpc.polkadot.parity', 'Polkadot', { ns: 'apps-config' }), + providers: { + Parity: 'wss://rpc.polkadot.io', + OnFinality: 'wss://polkadot.api.onfinality.io/public-ws', + 'Patract Elara': 'wss://polkadot.elara.patract.io' + }, + linked: [ + // parachains with id, see Rococo + // alphabetical based on chain name + ] + }; +} diff --git a/packages/apps-config/src/endpoints/productionRelays.ts b/packages/apps-config/src/endpoints/productionRelays.ts new file mode 100644 index 0000000000..9b4adc7715 --- /dev/null +++ b/packages/apps-config/src/endpoints/productionRelays.ts @@ -0,0 +1,16 @@ +// Copyright 2017-2021 @polkadot/apps-config authors & contributors +// SPDX-License-Identifier: Apache-2.0 + +import type { TFunction } from 'i18next'; +import type { LinkOption } from '../settings/types'; + +import { createKusama } from './productionRelayKusama'; +import { createPolkadot } from './productionRelayPolkadot'; +import { expandEndpoints } from './util'; + +export function createProductionRelays (t: TFunction): LinkOption[] { + return expandEndpoints(t, [ + createPolkadot(t), + createKusama(t) + ]); +} diff --git a/packages/apps-config/src/endpoints/testing.ts b/packages/apps-config/src/endpoints/testing.ts index a0e97297e7..2311757cee 100644 --- a/packages/apps-config/src/endpoints/testing.ts +++ b/packages/apps-config/src/endpoints/testing.ts @@ -160,6 +160,13 @@ export function createTesting (t: TFunction): LinkOption[] { GamePower: 'wss://gamepower.io' } }, + { + info: 'halongbay', + text: 'Halongbay Testnet', + providers: { + Halongbay: 'wss://halongbay.polkafoundry.com' + } + }, { info: 'ipse', text: t('rpc.ipse', 'IPSE', { ns: 'apps-config' }), @@ -177,14 +184,6 @@ export function createTesting (t: TFunction): LinkOption[] { Patract: 'wss://ws.jupiter-poa.patract.cn' } }, - { - info: 'acala', - text: t('rpc.mandala', 'Mandala', { ns: 'apps-config' }), - providers: { - Acala: 'wss://acala-mandala.api.onfinality.io/public-ws', - 'Patract Elara': 'wss://mandala.elara.patract.io' - } - }, { info: 'kilt', text: t('rpc.kilt', 'KILT Mashnet', { ns: 'apps-config' }), @@ -199,6 +198,14 @@ export function createTesting (t: TFunction): LinkOption[] { Litentry: 'wss://testnet.litentry.io' } }, + { + info: 'acala', + text: t('rpc.mandala', 'Mandala', { ns: 'apps-config' }), + providers: { + Acala: 'wss://acala-mandala.api.onfinality.io/public-ws', + 'Patract Elara': 'wss://mandala.elara.patract.io' + } + }, { info: 'moonbaseAlpha', text: t('rpc.moonbeam', 'Moonbase Alpha', { ns: 'apps-config' }), @@ -208,6 +215,21 @@ export function createTesting (t: TFunction): LinkOption[] { 'Patract Elara': 'wss://moonbase.moonbeam.elara.patract.io' } }, + { + info: 'mybank', + text: t('rpc.mybank', 'mybank.network', { ns: 'apps-config' }), + providers: { + MYBANK: 'wss://mybank.network/substrate' + } + }, + { + info: 'nftmart', + text: t('rpc.nftmart', 'NFTMart', { ns: 'apps-config' }), + providers: { + NFTMartDev: 'wss://dev-ws.nftmart.io', + NFTMartStaging: 'wss://staging-ws.nftmart.io' + } + }, { info: 'phala', text: t('rpc.phala', 'Phala PoC-4', { ns: 'apps-config' }), @@ -292,6 +314,13 @@ export function createTesting (t: TFunction): LinkOption[] { Unique: 'wss://testnet2.uniquenetwork.io' } }, + { + info: 'unitv', + text: t('rpc.unitv', 'Unit Network', { ns: 'apps-config' }), + providers: { + 'Unit Network': 'wss://unitventures.io/' + } + }, { info: 'vln', text: t('rpc.vln', 'Valiu Liquidity Network', { ns: 'apps-config' }), @@ -313,17 +342,6 @@ export function createTesting (t: TFunction): LinkOption[] { Web3Games: 'wss://substrate.org.cn:4443' } }, - { - dnslink: 'westend', - info: 'westend', - text: t('rpc.westend', 'Westend', { ns: 'apps-config' }), - providers: { - Parity: 'wss://westend-rpc.polkadot.io', - 'NodeFactory(Vedran)': 'wss://westend.vedran.nodefactory.io/ws', - 'Patract Elara': 'wss://westend.elara.patract.io', - OnFinality: 'wss://westend.api.onfinality.io/public-ws' - } - }, { info: 'zeitgeist', text: t('rpc.zeitgeist', 'Zeitgeist Battery Park', { ns: 'apps-config' }), @@ -337,35 +355,6 @@ export function createTesting (t: TFunction): LinkOption[] { providers: { ZERO: 'wss://alphaville.zero.io' } - }, - { - info: 'mybank', - text: t('rpc.mybank', 'mybank.network', { ns: 'apps-config' }), - providers: { - MYBANK: 'wss://mybank.network/substrate' - } - }, - { - info: 'unitv', - text: t('rpc.unitv', 'Unit Network', { ns: 'apps-config' }), - providers: { - 'Unit Network': 'wss://unitventures.io/' - } - }, - { - info: 'nftmart', - text: t('rpc.nftmart', 'NFTMart', { ns: 'apps-config' }), - providers: { - NFTMartDev: 'wss://dev-ws.nftmart.io', - NFTMartStaging: 'wss://staging-ws.nftmart.io' - } - }, - { - info: 'halongbay', - text: 'Halongbay Testnet', - providers: { - Halongbay: 'wss://halongbay.polkafoundry.com' - } } ]); } diff --git a/packages/apps-config/src/endpoints/testingRococo.ts b/packages/apps-config/src/endpoints/testingRelayRococo.ts similarity index 95% rename from packages/apps-config/src/endpoints/testingRococo.ts rename to packages/apps-config/src/endpoints/testingRelayRococo.ts index 63a48dcf76..d260b719e2 100644 --- a/packages/apps-config/src/endpoints/testingRococo.ts +++ b/packages/apps-config/src/endpoints/testingRelayRococo.ts @@ -2,10 +2,9 @@ // SPDX-License-Identifier: Apache-2.0 import type { TFunction } from 'i18next'; -import type { LinkOption } from '../settings/types'; +import type { EndpointOption } from './types'; import { ROCOCO_GENESIS } from '../api/constants'; -import { expandEndpoints } from './util'; /* eslint-disable sort-keys */ @@ -16,8 +15,8 @@ import { expandEndpoints } from './util'; // value: The actual hosted secure websocket endpoint // Based on history, this will expand so keep it as a singular chunk -export function createRococo (t: TFunction): LinkOption[] { - return expandEndpoints(t, [{ +export function createRococo (t: TFunction): EndpointOption { + return { dnslink: 'rococo', genesisHash: ROCOCO_GENESIS, info: 'rococo', @@ -65,7 +64,6 @@ export function createRococo (t: TFunction): LinkOption[] { // add any additional parachains here, alphabetical { info: 'rococoApron', - // paraId >= 1000, below that is reserved for system parachains paraId: 2048, text: t('rpc.rococo.apron', 'Apron PC1', { ns: 'apps-config' }), providers: { @@ -90,8 +88,6 @@ export function createRococo (t: TFunction): LinkOption[] { }, { info: 'rococoBitCountry', - // Needs paraId >= 1000, below that is reserved for system parachains - // Update paraId to new selection, remove this flag to enable paraId: 1008, text: t('rpc.rococo.bitcountry', 'Bit.Country PC1', { ns: 'apps-config' }), providers: { @@ -166,6 +162,17 @@ export function createRococo (t: TFunction): LinkOption[] { DataHighway: 'wss://spreehafen.datahighway.com' } }, + { + info: 'rococoEave', + // Needs paraId >= 1000, below that is reserved for system parachains + // Update paraId to new selection, remove this flag to enable + isDisabled: true, + paraId: 77, + text: t('rpc.rococo.eave', 'Steam PC', { ns: 'apps-config' }), + providers: { + EAVE: 'wss://steamcollator.eave.network' + } + }, { info: 'rococoEncointer', paraId: 1862, @@ -217,14 +224,6 @@ export function createRococo (t: TFunction): LinkOption[] { SCS: 'wss://rococo.integritee.network' } }, - { - info: 'rococoJupiter', - paraId: 1010, - text: t('rpc.rococo.jupiter', 'Patract Jupiter PC1', { ns: 'apps-config' }), - providers: { - jupiter: 'wss://ws.rococo.jupiter.patract.cn' - } - }, { info: 'rococoKilt', paraId: 12623, @@ -270,9 +269,6 @@ export function createRococo (t: TFunction): LinkOption[] { }, { info: 'rococoManta', - // Needs paraId >= 1000, below that is reserved for system parachains - // Update paraId to new selection, remove this flag to enable - // isDisabled: true, paraId: 2021, text: t('rpc.rococo.manta', 'Manta PC1', { ns: 'apps-config' }), providers: { @@ -295,6 +291,14 @@ export function createRococo (t: TFunction): LinkOption[] { Parami: 'wss://rococo.parami.io' } }, + { + info: 'rococoJupiter', + paraId: 1010, + text: t('rpc.rococo.jupiter', 'Patract Jupiter PC1', { ns: 'apps-config' }), + providers: { + jupiter: 'wss://ws.rococo.jupiter.patract.cn' + } + }, { info: 'rococoPhala', paraId: 1030, @@ -303,6 +307,14 @@ export function createRococo (t: TFunction): LinkOption[] { Phala: 'wss://rococov1.phala.network/ws' } }, + { + info: 'rococoPhoenix', + paraId: 6806, + text: t('rpc.rococo.phoenix', 'PHOENIX PC1', { ns: 'apps-config' }), + providers: { + 'PHOENIX Protocol': 'wss://phoenix-ws.coinid.pro' + } + }, { info: 'rococoPlasm', paraId: 5000, @@ -338,17 +350,6 @@ export function createRococo (t: TFunction): LinkOption[] { Airalab: 'wss://rococo.parachain.robonomics.network' } }, - { - info: 'rococoEave', - // Needs paraId >= 1000, below that is reserved for system parachains - // Update paraId to new selection, remove this flag to enable - isDisabled: true, - paraId: 77, - text: t('rpc.rococo.eave', 'Steam PC', { ns: 'apps-config' }), - providers: { - EAVE: 'wss://steamcollator.eave.network' - } - }, { info: 'rococoSubDAO', // Needs paraId >= 1000, below that is reserved for system parachains @@ -379,22 +380,6 @@ export function createRococo (t: TFunction): LinkOption[] { TrustBase: 'wss://rococo.trustednodes.net' } }, - { - info: 'rococoZenlink', - paraId: 1188, - text: t('rpc.rococo.zenlink', 'Zenlink PC1', { ns: 'apps-config' }), - providers: { - Zenlink: 'wss://rococo-parachain.zenlink.pro' - } - }, - { - info: 'rococoPhoenix', - paraId: 6806, - text: t('rpc.rococo.phoenix', 'PHOENIX PC1', { ns: 'apps-config' }), - providers: { - 'PHOENIX Protocol': 'wss://phoenix-ws.coinid.pro' - } - }, { info: 'rococoUnitv', // Needs paraId >= 1000, below that is reserved for system parachains @@ -421,7 +406,15 @@ export function createRococo (t: TFunction): LinkOption[] { providers: { Zeitgeist: 'wss://roc.zeitgeist.pm' } + }, + { + info: 'rococoZenlink', + paraId: 1188, + text: t('rpc.rococo.zenlink', 'Zenlink PC1', { ns: 'apps-config' }), + providers: { + Zenlink: 'wss://rococo-parachain.zenlink.pro' + } } ] - }]); + }; } diff --git a/packages/apps-config/src/endpoints/testingRelayWestend.ts b/packages/apps-config/src/endpoints/testingRelayWestend.ts new file mode 100644 index 0000000000..b31f0715a3 --- /dev/null +++ b/packages/apps-config/src/endpoints/testingRelayWestend.ts @@ -0,0 +1,34 @@ +// Copyright 2017-2021 @polkadot/apps-config authors & contributors +// SPDX-License-Identifier: Apache-2.0 + +import type { TFunction } from 'i18next'; +import type { EndpointOption } from './types'; + +import { WESTEND_GENESIS } from '../api/constants'; + +/* eslint-disable sort-keys */ + +// The available endpoints that will show in the dropdown. For the most part (with the exception of +// Polkadot) we try to keep this to live chains only, with RPCs hosted by the community/chain vendor +// info: The chain logo name as defined in ../ui/logos/index.ts in namedLogos (this also needs to align with @polkadot/networks) +// text: The text to display on the dropdown +// value: The actual hosted secure websocket endpoint + +// Based on history, this will expand so keep it as a singular chunk +export function createWestend (t: TFunction): EndpointOption { + return { + dnslink: 'westend', + genesisHash: WESTEND_GENESIS, + info: 'westend', + text: t('rpc.westend', 'Westend', { ns: 'apps-config' }), + providers: { + Parity: 'wss://westend-rpc.polkadot.io', + 'NodeFactory(Vedran)': 'wss://westend.vedran.nodefactory.io/ws', + 'Patract Elara': 'wss://westend.elara.patract.io', + OnFinality: 'wss://westend.api.onfinality.io/public-ws' + }, + linked: [ + // all parachains here (with paraId, see Rococo) + ] + }; +} diff --git a/packages/apps-config/src/endpoints/testingRelays.ts b/packages/apps-config/src/endpoints/testingRelays.ts new file mode 100644 index 0000000000..029a0076de --- /dev/null +++ b/packages/apps-config/src/endpoints/testingRelays.ts @@ -0,0 +1,16 @@ +// Copyright 2017-2021 @polkadot/apps-config authors & contributors +// SPDX-License-Identifier: Apache-2.0 + +import type { TFunction } from 'i18next'; +import type { LinkOption } from '../settings/types'; + +import { createRococo } from './testingRelayRococo'; +import { createWestend } from './testingRelayWestend'; +import { expandEndpoints } from './util'; + +export function createTestingRelays (t: TFunction): LinkOption[] { + return expandEndpoints(t, [ + createRococo(t), + createWestend(t) + ]); +} diff --git a/packages/apps-config/src/settings/types.ts b/packages/apps-config/src/settings/types.ts index 7aee4758e9..349fbefc8f 100644 --- a/packages/apps-config/src/settings/types.ts +++ b/packages/apps-config/src/settings/types.ts @@ -15,6 +15,7 @@ export interface LinkOption extends Option { genesisHashRelay?: string; isChild?: boolean; isDevelopment?: boolean; + isSpaced?: boolean; linked?: LinkOption[]; paraId?: number; textBy: string; diff --git a/packages/apps/src/Endpoints/Group.tsx b/packages/apps/src/Endpoints/Group.tsx index e0766ba40b..0d44cdd131 100644 --- a/packages/apps/src/Endpoints/Group.tsx +++ b/packages/apps/src/Endpoints/Group.tsx @@ -22,7 +22,7 @@ interface Props { value: Group; } -function GroupDisplay ({ affinities, apiUrl, children, className = '', index, isSelected, setApiUrl, setGroup, value: { header, networks } }: Props): React.ReactElement { +function GroupDisplay ({ affinities, apiUrl, children, className = '', index, isSelected, setApiUrl, setGroup, value: { header, isSpaced, networks } }: Props): React.ReactElement { const _setGroup = useCallback( () => setGroup(isSelected ? -1 : index), [index, isSelected, setGroup] @@ -31,7 +31,7 @@ function GroupDisplay ({ affinities, apiUrl, children, className = '', index, is return (
@@ -70,6 +70,10 @@ export default React.memo(styled(GroupDisplay)` background: var(--bg-table); } + &.isSpaced { + margin-top: 0.75rem; + } + .ui--Icon { margin-right: 0.5rem; } diff --git a/packages/apps/src/Endpoints/index.tsx b/packages/apps/src/Endpoints/index.tsx index fe63a275b2..dd3f944b26 100644 --- a/packages/apps/src/Endpoints/index.tsx +++ b/packages/apps/src/Endpoints/index.tsx @@ -46,7 +46,7 @@ function isValidUrl (url: string): boolean { function combineEndpoints (endpoints: LinkOption[]): Group[] { return endpoints.reduce((result: Group[], e): Group[] => { if (e.isHeader) { - result.push({ header: e.text, isDevelopment: e.isDevelopment, networks: [] }); + result.push({ header: e.text, isDevelopment: e.isDevelopment, isSpaced: e.isSpaced, networks: [] }); } else { const prev = result[result.length - 1]; const prov = { name: e.textBy, url: e.value as string }; diff --git a/packages/apps/src/Endpoints/types.ts b/packages/apps/src/Endpoints/types.ts index cb69cbb4d6..f80aaa8dda 100644 --- a/packages/apps/src/Endpoints/types.ts +++ b/packages/apps/src/Endpoints/types.ts @@ -16,5 +16,6 @@ export interface Network { export interface Group { header: React.ReactNode; isDevelopment?: boolean; + isSpaced?: boolean; networks: Network[]; }