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);