Pin Polkadot CC1 ahead of Kusama (#265)

This commit is contained in:
Maciej Hirsz
2020-05-26 19:23:32 +02:00
committed by GitHub
parent be12d5f0f6
commit 246ab4e251
3 changed files with 17 additions and 9 deletions
+11 -1
View File
@@ -1,7 +1,17 @@
import { Types, Maybe, SortedCollection } from './common';
import { Column } from './components/List';
export const PINNED_CHAIN = 'Kusama';
export const PINNED_CHAINS = {
Kusama: 2,
'Polkadot CC1': 1,
};
export function comparePinnedChains(a: string, b: string) {
const aWeight = PINNED_CHAINS[a] || 1024;
const bWeight = PINNED_CHAINS[b] || 1024;
return aWeight - bWeight;
}
export class Node {
public static compare(a: Node, b: Node): number {