Skip to content

fix: Remove callback in getPageForToken#7576

Open
mvadari wants to merge 1 commit into
xrplf/sponsorfrom
mvadari/sponsor/fix-nft-callback
Open

fix: Remove callback in getPageForToken#7576
mvadari wants to merge 1 commit into
xrplf/sponsorfrom
mvadari/sponsor/fix-nft-callback

Conversation

@mvadari

@mvadari mvadari commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

High Level Overview of Change

Title says it all

Context of Change

PR review

API Impact

N/A

@xrplf-ai-reviewer xrplf-ai-reviewer Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues.

Review by Claude Sonnet 4.6 · Prompt: V15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR simplifies NFT page creation by removing the callback parameter from getPageForToken and inlining the “new page” bookkeeping logic directly inside the helper, reducing indirection within NFTokenHelpers.cpp.

Changes:

  • Removed the std::function callback parameter from getPageForToken.
  • Introduced a local onNewPage lambda inside getPageForToken to handle reserve checks, owner count adjustment, and sponsor attachment for newly created pages.
  • Updated insertToken to call the new getPageForToken signature and removed the now-unneeded local callback.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov

codecov Bot commented Jun 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.2%. Comparing base (d1a77b4) to head (2c65201).

Additional details and impacted files

Impacted file tree graph

@@               Coverage Diff               @@
##           xrplf/sponsor   #7576     +/-   ##
===============================================
- Coverage           82.2%   82.2%   -0.0%     
===============================================
  Files               1016    1016             
  Lines              78401   78402      +1     
  Branches            9012    9014      +2     
===============================================
- Hits               64440   64437      -3     
- Misses             13952   13956      +4     
  Partials               9       9             
Files with missing lines Coverage Δ
src/libxrpl/ledger/helpers/NFTokenHelpers.cpp 89.4% <100.0%> (+<0.1%) ⬆️

... and 3 files with indirect coverage changes

Impacted file tree graph

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mvadari mvadari requested a review from Kassaking7 June 19, 2026 00:19
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