Skip to content

Commit 12139d4

Browse files
committed
Merge branch 'sort-keystores'
2 parents 70e8ea4 + 937a023 commit 12139d4

File tree

1 file changed

+7
-1
lines changed
  • frontends/web/src/routes/account

1 file changed

+7
-1
lines changed

frontends/web/src/routes/account/utils.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,13 @@ export function getAccountsByKeystore(accounts: IAccount[]): TAccountsByKeystore
112112
}
113113
acc[key].accounts.push(account);
114114
return acc;
115-
}, {} as Record<string, TAccountsByKeystore>));
115+
}, {} as Record<string, TAccountsByKeystore>))
116+
// sort the output array as we noticed that somehow the input accounts
117+
// list seems to be possibly ordered differently in different places
118+
// in the code (e.g. sidebar vs manage account page)
119+
.sort((ac1, ac2) => {
120+
return ac1.keystore.name.localeCompare(ac2.keystore.name);
121+
});
116122
}
117123

118124
// Returns true if more than one keystore has the given name.

0 commit comments

Comments
 (0)