We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When I use this SDK to build React Front-end , I invoked the function below .
Code snippet to reproduce
export const getAccountModulesWrapper = async (accountAddress: string) => { return await aptos.getAccountModules({ accountAddress: accountAddress, options: { limit: 10, offset: 1 } }) }
Stack trace / error message
So I checked network records .
The api request payload is like ( This is how the SDK translates the aptos.getAccountModules() api to do ) https://api.testnet.aptoslabs.com/v1/accounts/0xf4fd53f1334877ef7aae3241ba87708bf38c618aaa2a22f09e84720fab3328ee/modules?start=11&limit=10
Notice the query params, is start , not offset
so I change the link like this to try https://api.testnet.aptoslabs.com/v1/accounts/0xf4fd53f1334877ef7aae3241ba87708bf38c618aaa2a22f09e84720fab3328ee/modules?offset=11&limit=10
it worked.
System details:
Basically , it's a query params convert issue.
The text was updated successfully, but these errors were encountered:
[account] Fix pagination on AccountModules and AccountResources
4294df4
Resolves #576
6111809
Yeah, looks like a bug. Actually amazed it hadn't been hit until now.
Offset is actually a long input, and not just a number to start with, so the PR attached will fix this and the documentation
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
🐛 Bug Description
When I use this SDK to build React Front-end , I invoked the function below .
How to reproduce
Code snippet to reproduce
Stack trace / error message
So I checked network records .
The api request payload is like ( This is how the SDK translates the aptos.getAccountModules() api to do )
https://api.testnet.aptoslabs.com/v1/accounts/0xf4fd53f1334877ef7aae3241ba87708bf38c618aaa2a22f09e84720fab3328ee/modules?start=11&limit=10
Notice the query params, is start , not offset
so I change the link like this to try
https://api.testnet.aptoslabs.com/v1/accounts/0xf4fd53f1334877ef7aae3241ba87708bf38c618aaa2a22f09e84720fab3328ee/modules?offset=11&limit=10
it worked.
System information
System details:
Basically , it's a query params convert issue.
The text was updated successfully, but these errors were encountered: