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:
@@ -4,6 +4,7 @@
|
||||
|
||||
Changes:
|
||||
|
||||
- Adjust network sorting (primary by prefix, secondary by name)
|
||||
- Sync with upstream Substrate ss58 registry
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user