added height to db
This commit is contained in:
parent
b4e6a6662e
commit
15322c3639
5 changed files with 34 additions and 22 deletions
helpers/functions
|
@ -16,8 +16,8 @@ function filterForFreePublicClaims (claimsListArray) {
|
|||
return freePublicClaims;
|
||||
}
|
||||
|
||||
function orderTopClaims (claimsListArray) {
|
||||
logger.debug('ordering the top claims');
|
||||
function orderClaims (claimsListArray) {
|
||||
logger.debug('ordering the free public claims');
|
||||
claimsListArray.sort((a, b) => {
|
||||
if (a.amount === b.amount) {
|
||||
return a.height < b.height;
|
||||
|
@ -51,7 +51,7 @@ module.exports = claimName => {
|
|||
return;
|
||||
}
|
||||
// order the claims
|
||||
const orderedPublicClaims = orderTopClaims(freePublicClaims);
|
||||
const orderedPublicClaims = orderClaims(freePublicClaims);
|
||||
// resolve the promise
|
||||
resolve(orderedPublicClaims);
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue