Skip to content

Conversation

@7i7o
Copy link
Contributor

@7i7o 7i7o commented Oct 15, 2024

Summary

This PR adds a new function to the api called tokenBalance that requires the "ACCESS_TOKENS" permissions

You can fetch the balance of a token by providing the token's id:

const tokenBalance = await window.arweaveWallet.tokenBalance("<AO_TOKEN_ID>");

It should return the token's balance in a string in the same format as userTokens returns the balances for each token

Tasks:

Copy link
Contributor

@pawanpaudel93 pawanpaudel93 left a comment

Choose a reason for hiding this comment

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

tACK

@nicholaswma nicholaswma merged commit 64903ae into development Oct 18, 2024
@nicholaswma nicholaswma deleted the fix-token-promises branch October 18, 2024 17:57
@github-actions
Copy link

🎉 This PR is included in version 1.20.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants