Sort payout eras for display (#2775)
This commit is contained in:
parent
f44a2bd087
commit
41902fb93d
@ -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];
|
||||
|
||||
Loading…
Reference in New Issue
Block a user