Adjust network sorting (primary by prefix, secondary by name) (#1375)

* djust network sortying (primary by prefix, secondary by name)

* Typo
This commit is contained in:
Jaco
2022-01-13 13:09:20 +02:00
committed by GitHub
parent 43476b9c5d
commit a051a84187
2 changed files with 5 additions and 4 deletions
+1
View File
@@ -4,6 +4,7 @@
Changes:
- Adjust network sorting (primary by prefix, secondary by name)
- Sync with upstream Substrate ss58 registry
+4 -4
View File
@@ -43,12 +43,12 @@ function sortNetworks (a: Network, b: Network): number {
const isUnSortedB = UNSORTED.includes(b.prefix);
return isUnSortedA === isUnSortedB
? 0
? isUnSortedA
? 0
: a.displayName.localeCompare(b.displayName)
: isUnSortedA
? -1
: isUnSortedB
? 1
: a.displayName.localeCompare(b.displayName);
: 1;
}
// This is all the Substrate networks with our additional information