diff --git a/packages/frontend/src/App.tsx b/packages/frontend/src/App.tsx index b60b4eb..90b950a 100644 --- a/packages/frontend/src/App.tsx +++ b/packages/frontend/src/App.tsx @@ -3,7 +3,7 @@ import { Types, SortedCollection } from '@dotstats/common'; import { AllChains, Chains, Chain, Ago, OfflineIndicator } from './components'; import { Connection } from './Connection'; import { PersistentObject, PersistentSet } from './persist'; -import { State, Node, ChainData } from './state'; +import { State, Node, ChainData, PINNED_CHAIN } from './state'; import { getHashData } from './utils'; import stable from 'stable'; @@ -158,11 +158,11 @@ export default class App extends React.Component<{}, State> { .inplace( Array.from(this.state.chains.entries()), (a, b) => { - if (a[0] === 'Alexander') { + if (a[0] === PINNED_CHAIN) { return -1; } - if (b[0] === 'Alexander') { + if (b[0] === PINNED_CHAIN) { return 1; } diff --git a/packages/frontend/src/Connection.ts b/packages/frontend/src/Connection.ts index 13e616d..944186c 100644 --- a/packages/frontend/src/Connection.ts +++ b/packages/frontend/src/Connection.ts @@ -1,5 +1,5 @@ import { VERSION, timestamp, FeedMessage, Types, Maybe, sleep } from '@dotstats/common'; -import { State, Update, Node, UpdateBound } from './state'; +import { State, Update, Node, UpdateBound, PINNED_CHAIN } from './state'; import { PersistentSet } from './persist'; import { getHashData, setHashData } from './utils'; import { AfgHandling } from './AfgHandling'; @@ -416,7 +416,7 @@ export class Connection { let topCount: Types.NodeCount = 0 as Types.NodeCount; for (const [label, count] of chains.entries()) { - if (label === 'Alexander') { + if (label === PINNED_CHAIN) { topLabel = label; break; } diff --git a/packages/frontend/src/state.ts b/packages/frontend/src/state.ts index ed5dc20..093090a 100644 --- a/packages/frontend/src/state.ts +++ b/packages/frontend/src/state.ts @@ -1,5 +1,7 @@ import { Types, Maybe, SortedCollection } from '@dotstats/common'; +export const PINNED_CHAIN = 'Kusama CC1'; + export class Node { public static compare(a: Node, b: Node): number { if (a.pinned === b.pinned && a.stale === b.stale) {