Skip to content

Fix asset ordering validation to correctly check NFT state - #1478

Open
AdriGeorge wants to merge 2 commits into
mainfrom
fix/consume-unlisted
Open

AdriGeorge wants to merge 2 commits into
mainfrom
fix/consume-unlisted

Conversation

@AdriGeorge

@AdriGeorge AdriGeorge commented Sep 23, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes # .

Changes proposed in this PR:

  • Fix asset ordering validation to allow Unlisted assets. The previous in check looked for the state as an array index rather than an allowed value, incorrectly rejecting state 5. Use includes() and reject assets with missing NFT metadata.

Summary by CodeRabbit

  • Bug Fixes
    • Ordering checks now correctly treat assets with missing NFT metadata as unavailable for ordering and return the appropriate failure reason. This prevents assets without the required metadata from incorrectly passing the ordering eligibility check.

@coderabbitai

coderabbitai Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: b9a45ad8-8ac5-4ad1-9fff-5762e151ea6a

📥 Commits

Reviewing files that changed from the base of the PR and between bf4b071 and 1b721b0.

📒 Files selected for processing (1)
  • src/components/core/handler/downloadHandler.ts

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The ordering eligibility check now rejects an asset when its NFT metadata is missing. It also uses includes to check whether the NFT state is active or unlisted.

Changes

Ordering eligibility

Layer / File(s) Summary
NFT presence and state validation
src/components/core/handler/downloadHandler.ts
The check rejects assets without NFT metadata and tests for allowed NFT states with includes.

Priority: ⚪ Not assessed

Estimated code review effort: 2 (Simple) | ~5 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 1b721

The eligibility change appears consistent with the stated ordering behavior, with no established issue requiring resolution before merge.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: correcting NFT state validation during asset ordering.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants