Sort payout eras for display (#2775)

This commit is contained in:
Jaco Greeff 2020-05-19 14:16:57 +02:00 committed by GitHub
parent f44a2bd087
commit 41902fb93d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -16,6 +16,7 @@ export function createErasString (eras: BN[]): React.ReactNode {
}
const parts = eras
.sort((a, b) => a.cmp(b))
.reduce((result: (BN | [BN, BN])[], era): (BN | [BN, BN])[] => {
if (result.length === 0) {
return [era];