Skip to content
This repository has been archived by the owner on Sep 1, 2021. It is now read-only.

claimAvailability treats abandoned claim names as unavailable on publish #1033

Open
jessopb opened this issue Aug 20, 2019 · 0 comments
Open

Comments

@jessopb
Copy link
Member

jessopb commented Aug 20, 2019

Most queries in chainquery claimQueries restrict queries:

const whereClause = bidState || {
      [sequelize.Op.or]: [
        { bid_state: 'Controlling' },
        { bid_state: 'Active' },
        { bid_state: 'Accepted' },
      ],
    };

checkClaimAvailability has it's own chainquery.claim query:

  return chainquery.claim
    .findAll({
      attributes: ['claim_address'],
      where     : {
        name,
        claim_address: {
          [Op.or]: claimAddresses,
        },
      },
    })
    .then(result => {
      return (result.length <= 0);
    })
    .catch(error => {
      throw error;
    });

That causes claims to show as reserved names even when abandoned. This query could probably be moved into claim queries with the rest of them.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant