Workaround CQ spent bug
This commit is contained in:
parent
a09216da76
commit
9a5d0954df
1 changed files with 3 additions and 3 deletions
|
@ -31,7 +31,7 @@ module.exports.getClaim = async function getClaim(claimName, claimId, channelNam
|
|||
'FROM claim ' +
|
||||
'LEFT JOIN claim channel_claim on claim.publisher_id = channel_claim.claim_id ' +
|
||||
'LEFT JOIN claim as reposted_claim on reposted_claim.claim_id = claim.claim_reference ' +
|
||||
'AND (reposted_claim.bid_state="controlling" OR reposted_claim.bid_state="active")' +
|
||||
'AND (reposted_claim.bid_state in ("controlling", "active", "accepted", "spent") ' +
|
||||
'LEFT JOIN claim as repost_channel on repost_channel.claim_id = reposted_claim.publisher_id ' +
|
||||
'WHERE claim.name = ?';
|
||||
|
||||
|
@ -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", "spent")';
|
||||
|
||||
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", "spent")';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue