pbca26
8 years ago
5 changed files with 18 additions and 15 deletions
@ -1,10 +1,10 @@ |
|||
export function sortByDate(data) { |
|||
return data.sort(function(a, b) { |
|||
if (a.timestamp && |
|||
b.timestamp) { |
|||
return b.timestamp - a.timestamp; |
|||
if (a.confirmations && |
|||
b.confirmations) { |
|||
return a.confirmations - b.confirmations; |
|||
} else { |
|||
return b.blocktime - a.blocktime; |
|||
return a.confirmations - b.confirmations; |
|||
} |
|||
}); |
|||
} |
Loading…
Reference in new issue