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

Implement optimised Solana token balances fetcher #30584

Closed
onyb opened this issue May 25, 2023 · 1 comment · Fixed by brave/brave-core#18609
Closed

Implement optimised Solana token balances fetcher #30584

onyb opened this issue May 25, 2023 · 1 comment · Fixed by brave/brave-core#18609

Comments

@onyb
Copy link
Member

onyb commented May 25, 2023

Using getTokenAccountsByOwner RPC with jsonParsed encoding, we can get all the token balances held by a Solana public key, without individually querying balances for each token. This will greatly improve performance in the following areas:

  1. Swaps, where we fetch balances for the entire tokens list, one by one.
  2. Building portfolio balances for Solana accounts.
@onyb onyb changed the title Implement optimised balance fetcher using getTokenAccountsByOwner Implement optimised Solana token balances fetcher May 25, 2023
@onyb onyb self-assigned this May 25, 2023
@brave-builds brave-builds added this to the 1.54.x - Nightly milestone May 26, 2023
@srirambv
Copy link
Contributor

Verification passed on

Brave 1.57.18 Chromium: 115.0.5790.98 (Official Build) beta (64-bit)
Revision d515871a6c6df7d2843e755c8b7dda9b744f26d6
OS Windows 11 Version 22H2 (Build 22621.1992)
30584.mp4

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