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

account_objects method does not return NFTokenPages (Version: 1.9.4) #4347

Closed
nixer89 opened this issue Nov 17, 2022 · 4 comments · Fixed by #4352
Closed

account_objects method does not return NFTokenPages (Version: 1.9.4) #4347

nixer89 opened this issue Nov 17, 2022 · 4 comments · Fixed by #4352

Comments

@nixer89
Copy link
Collaborator

nixer89 commented Nov 17, 2022

Issue Description

When trying to get an xrpl accounts owned objects, the method account_objects does not return NFTokenPage(s). This is a problem because one could not reliably show the user which objects currently count towards his owner reserve.

The documentation also states:
The account_objects command returns the raw [ledger format](https://xrpl.org/ledger-object-types.html) for all objects owned by an account.

Steps to Reproduce

  1. call the account_objects method of an account which owns some NFTs
  2. response does not include any NFTokenPage

Expected Result

Also NFTokenPages are returned through the account_objects method.

Actual Result

No NFTokenPage is returned

This is actually quite a problem. On accounts with NFTs, the OwnerCount of the AccountRoot objects shows a bigger number than objects are returned by the account_objects method. This confuses developers as well as users.

@RichardAH
Copy link
Collaborator

Here is a code solution: https://github.com/RichardAH/rippled/tree/nftpage_accobjs

I have tested by hand but it needs unit tests to go in. If someone wants to provide those then we can PR it.

@scottschurr
Copy link
Collaborator

The top-most commit here adds unit tests and fixes a couple of bugs in corner cases:

https://github.com/scottschurr/rippled/commits/RichardAH-nftpage_accobjs

You're welcome to cherry-pick the commit if you would like.

@cjcobb23
Copy link
Contributor

Why can't this just be done client side?

@RichardAH
Copy link
Collaborator

The top-most commit here adds unit tests and fixes a couple of bugs in corner cases:

https://github.com/scottschurr/rippled/commits/RichardAH-nftpage_accobjs

You're welcome to cherry-pick the commit if you would like.

Thanks! will do today!

Why can't this just be done client side?

I actually have a client side solution. It is very hacky indeed. Curious to see if you can figure out what it is before I share it

intelliot pushed a commit that referenced this issue Apr 5, 2023
- Include NFTokenPages in account_objects to make it easier to
  understand an account's Owner Reserve and simplify app development.
- Update related tests and documentation.
- Fix #4347.

For info about the Owner Reserve, see https://xrpl.org/reserves.html

---------

Co-authored-by: Scott Schurr <[email protected]>
Co-authored-by: Ed Hennis <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants