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