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

RpcClient: get_token_accounts_by_owner now returns UiTokenAccounts #11364

Merged
merged 1 commit into from
Aug 4, 2020

Conversation

mvines
Copy link
Member

@mvines mvines commented Aug 4, 2020

get_token_accounts_by_owner() was returning Account structs, which is just a bunch of octets. Instead decode (on the client side) into a more useful UiTokenAccounts so the client doesn't need to invoke solana_account_decoder themselves.

Freebee: add get_token_account() to fetch/decode (client side!) a token account. I didn't add support for mint or multisig yet, I imagine we'd add a get_token_mint_account() and get_token_multisig_account() when that need arises

@mvines
Copy link
Member Author

mvines commented Aug 4, 2020

Example usage in solana-labs/solana-program-library#188

Copy link
Contributor

@CriesofCarrots CriesofCarrots left a comment

Choose a reason for hiding this comment

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

Oh, awesome! Thought this might be a likely next step. Lgtm

@mvines mvines added the automerge Merge this Pull Request automatically once CI passes label Aug 4, 2020
@codecov
Copy link

codecov bot commented Aug 4, 2020

Codecov Report

Merging #11364 into master will decrease coverage by 0.0%.
The diff coverage is 0.0%.

@@            Coverage Diff            @@
##           master   #11364     +/-   ##
=========================================
- Coverage    82.3%    82.3%   -0.1%     
=========================================
  Files         315      315             
  Lines       74168    74224     +56     
=========================================
+ Hits        61084    61103     +19     
- Misses      13084    13121     +37     

@mergify mergify bot merged commit b5e03d6 into solana-labs:master Aug 4, 2020
@mvines mvines deleted the de branch August 4, 2020 23:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Merge this Pull Request automatically once CI passes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants