updated top free claim to use effective Amount

This commit is contained in:
bill bittner 2017-09-26 18:49:37 -07:00
parent f0b248ba9c
commit b78e881ebc

View file

@ -66,7 +66,7 @@ function getLongClaimIdFromShortClaimId (name, shortId) {
function getTopFreeClaimIdByClaimName (name) { function getTopFreeClaimIdByClaimName (name) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
db 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 => { .then(result => {
switch (result.length) { switch (result.length) {
case 0: case 0: