From b14f3c87f16de86b7ee9e21a70a28d6f31253fbe Mon Sep 17 00:00:00 2001 From: Thomas Zarebczan Date: Tue, 11 Aug 2020 18:07:49 -0400 Subject: [PATCH] Fix vanity + bid state for URLs This ensures controlling is returned first. --- web/src/chainquery.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/src/chainquery.js b/web/src/chainquery.js index c07fc2be2..35e6e06f4 100644 --- a/web/src/chainquery.js +++ b/web/src/chainquery.js @@ -40,7 +40,7 @@ module.exports.getClaim = async function getClaim(claimName, claimId, channelNam params.push(claimId + '%'); } - sql += ' AND claim.bid_state in ("controlling", "active", "accepted")'; + sql += ' AND claim.bid_state in ("controlling", "active", "accepted") ORDER BY claim.bid_state desc'; if (claimName[0] !== '@' && channelName) { sql += ' AND channel_claim.name = ?'; @@ -49,7 +49,7 @@ module.exports.getClaim = async function getClaim(claimName, claimId, channelNam sql += ' AND channel_claim.claim_id LIKE ?'; params.push(channelClaimId + '%'); } else { - sql += ' AND channel_claim.bid_state in ("controlling", "active", "accepted")'; + sql += ' AND channel_claim.bid_state in ("controlling", "active", "accepted") ORDER BY channel_claim.bid_state desc'; } }