Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: do not index NFTs for potentially "full" collections #101

Merged
merged 19 commits into from
Oct 4, 2023

Conversation

crnkovic
Copy link
Contributor

Summary

https://app.clickup.com/t/861nbbgp1

Checklist

  • I checked my UI changes against the design and there are no notable differences
  • I checked my UI changes for any responsiveness issues
  • I checked my (code) changes for obvious issues, debug statements and commented code
  • I opened a corresponding card on Clickup for any remaining TODOs in my code
  • I added a short description on how to test this PR (if necessary)
  • I added a storybook entry for the component that was added (if necessary)
  • Documentation (if necessary)
  • Tests (if necessary)
  • Ready to be merged

@crnkovic crnkovic marked this pull request as ready for review September 18, 2023 14:34
@ItsANameToo ItsANameToo added this to the 0.6.0 milestone Sep 19, 2023
app/Models/Collection.php Outdated Show resolved Hide resolved
app/Models/Collection.php Outdated Show resolved Hide resolved
@ItsANameToo ItsANameToo marked this pull request as draft September 19, 2023 10:17
@ItsANameToo ItsANameToo modified the milestones: 0.6.0, 0.7.0 Sep 22, 2023
@crnkovic crnkovic marked this pull request as ready for review September 22, 2023 12:01
public function isPotentiallyFull(): bool
{
// If there is no supply or if the NFTs for the collection haven't been indexed, we know for sure it's not full...
if ($this->last_indexed_token_number === null || $this->supply === null) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please note that we are already filtering out collections with supply=null: https://app.clickup.com/t/85zu0hdha

It's worth double-checking to ensure that we are not excessively filtering out collections.

https://github.com/ArdentHQ/dashbrd/pull/101/files#diff-5254893bd34d47c136df16ce1c571ddd8d62d0bd9a0d1730edecbbb049fa7d89R52

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wdym? we're filtering collections where the supply is not null so this check ($this->supply === null) will always be false and therefore irrelevant in this case

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

with the current way we call this isPotentiallyFull method we won't ever pass it a collection with a null supply, but for reliability I'd keep the check in case something calls it without the withAcceptableSupply scope as it avoids assumptions here

@ItsANameToo ItsANameToo merged commit 0ac09a3 into develop Oct 4, 2023
12 checks passed
@ItsANameToo ItsANameToo deleted the refactor/skip-full-collections branch October 4, 2023 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants