updated top free claim to use effective Amount
This commit is contained in:
parent
f0b248ba9c
commit
b78e881ebc
1 changed files with 1 additions and 1 deletions
|
@ -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:
|
||||||
|
|
Loading…
Reference in a new issue