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

[sdkv2] add indexer query getAccountOwnedTokensByTokenId #29

Closed
wants to merge 1 commit into from

Conversation

0xmigo
Copy link
Contributor

@0xmigo 0xmigo commented Oct 12, 2023

Description

Add getOwnedTokensByTokenData over to sdk v2

Note:

  1. Test is not included yet, will wait until we have Token client/class to wrap up the test.
  2. Another account token query getTokenOwnedFromCollectionNameAndCreatorAddress is not included, because it relies on getCollectionAddress query, which Oliver is working on.

Test Plan

pnpm fmt
pnpm test
pnpm lint

Related Links

Copy link
Contributor Author

0xmigo commented Oct 12, 2023

Current dependencies on/for this PR:

This comment was auto-generated by Graphite.

@0xmigo 0xmigo changed the title add indexer query getAccountOwnedTokensByTokenId [sdkv2] add indexer query getAccountOwnedTokensByTokenId Oct 12, 2023
@0xmigo 0xmigo requested a review from a team October 12, 2023 03:03
@0xmigo 0xmigo marked this pull request as ready for review October 12, 2023 03:03
Copy link
Collaborator

@0xmaayan 0xmaayan left a comment

Choose a reason for hiding this comment

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

we also need to add the api/internal functions...?

@@ -1,336 +1,96 @@
import * as Types from "./types";
import * as Types from './types';
Copy link
Collaborator

Choose a reason for hiding this comment

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

did you run fmt or something on this file? not sure why it changed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep, I generally run pnpm fmt on the whole repo.

Copy link
Collaborator

Choose a reason for hiding this comment

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

oh I think it ignores generated files, not sure why it changed here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm maybe pnpm run indexer-codegen auto reformats?

Copy link
Collaborator

Choose a reason for hiding this comment

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

ohh maybe....

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yeah, pnpm run indexer-codegen reformats, maybe we just apply autoformat to even generated files (just ignoring lints of course)

@0xmigo
Copy link
Contributor Author

0xmigo commented Oct 12, 2023

we also need to add the api/internal functions...?

oops, good catch.

@0xmigo
Copy link
Contributor Author

0xmigo commented Oct 12, 2023

Didn't realize this query already been ported over with a different name? I will close this PR - https://github.com/aptos-labs/aptos-ts-sdk/blob/main/src/internal/queries/getAccountOwnedTokensByTokenData.graphql#L2-L11

@0xmigo 0xmigo closed this Oct 12, 2023
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.

3 participants