From b78e881ebcc12990c542576fe2c974e40349d231 Mon Sep 17 00:00:00 2001 From: bill bittner Date: Tue, 26 Sep 2017 18:49:37 -0700 Subject: [PATCH] updated top free claim to use effective Amount --- models/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/index.js b/models/index.js index e4e870c5..e87a147d 100644 --- a/models/index.js +++ b/models/index.js @@ -66,7 +66,7 @@ function getLongClaimIdFromShortClaimId (name, shortId) { function getTopFreeClaimIdByClaimName (name) { return new Promise((resolve, reject) => { db - .sequelize.query(`SELECT claimId FROM Claim WHERE name = '${name}' ORDER BY amount DESC, height ASC LIMIT 1`, { type: db.sequelize.QueryTypes.SELECT }) + .sequelize.query(`SELECT claimId FROM Claim WHERE name = '${name}' ORDER BY effectiveAmount DESC, height ASC LIMIT 1`, { type: db.sequelize.QueryTypes.SELECT }) .then(result => { switch (result.length) { case 0: