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

Get Token Balance Issue #55

Open
antiergit opened this issue Aug 22, 2022 · 2 comments
Open

Get Token Balance Issue #55

antiergit opened this issue Aug 22, 2022 · 2 comments

Comments

@antiergit
Copy link

antiergit commented Aug 22, 2022

I want to get tokens balance on devnet. I am using getTokenAccountBalance method by public key but it doesn't return balance. Show "boringssl_metrics_log_metric_block_invoke(151) Failed to log metrics" error.

I am using getBalance method to get wallet balance its working.

How can I get token balance?

@bigearsenal
Copy link
Collaborator

Hello there, there is maybe an temporary problem on the node, can you test it right now?

@antiergit
Copy link
Author

let balance = try await apiClient.getBalance(account: publicKey!, commitment: nil)
let tokenBalance = try await apiClient.getTokenAccountBalance(pubkey: publicKey!, commitment: nil)

I am using both methods get balance method is working and return balance but getTokenAccountBalance method don't return anything.

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

No branches or pull requests

2 participants