From 58fc61ac0f41eeb9aafbeb956ab290f6926098ee Mon Sep 17 00:00:00 2001 From: Thomas Zarebczan Date: Mon, 28 Dec 2020 16:00:16 -0500 Subject: [PATCH] Fix vanity claim resolution We have a CQ hack to include spent claims (CQ bug), but this broke vanity names. --- web/src/chainquery.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/web/src/chainquery.js b/web/src/chainquery.js index f8342ef67..7b745a070 100644 --- a/web/src/chainquery.js +++ b/web/src/chainquery.js @@ -38,10 +38,11 @@ module.exports.getClaim = async function getClaim(claimName, claimId, channelNam if (claimId) { sql += ' AND claim.claim_id LIKE ?'; params.push(claimId + '%'); + sql += ' AND claim.bid_state in ("controlling", "active", "accepted", "spent")'; + } else { + sql += ' AND claim.bid_state in ("controlling", "active", "accepted")'; } - sql += ' AND claim.bid_state in ("controlling", "active", "accepted", "spent")'; - if (claimName[0] !== '@' && channelName) { sql += ' AND channel_claim.name = ?'; params.push('@' + channelName);