Fix vanity claim resolution

We have a CQ hack to include spent claims (CQ bug), but this broke vanity names.
This commit is contained in:
Thomas Zarebczan 2020-12-28 16:00:16 -05:00
parent a43f49cef2
commit 58fc61ac0f
No known key found for this signature in database
GPG key ID: D505010BDB4364BC

View file

@ -38,10 +38,11 @@ module.exports.getClaim = async function getClaim(claimName, claimId, channelNam
if (claimId) { if (claimId) {
sql += ' AND claim.claim_id LIKE ?'; sql += ' AND claim.claim_id LIKE ?';
params.push(claimId + '%'); 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) { if (claimName[0] !== '@' && channelName) {
sql += ' AND channel_claim.name = ?'; sql += ' AND channel_claim.name = ?';
params.push('@' + channelName); params.push('@' + channelName);