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

feat(frontend): reduce the number of calls of the Solana wallet #5060

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

AntonioVentilii
Copy link
Collaborator

Motivation

We pay the calls of the Solana RPC provider, and they are proportional to the number. It is becoming too unscalable.

So, as a temporary measure, we delay the calls of the Solana wallet scheduler to one minute (double the other wallets).

Future improvement

This solution should be removed when we have a better one. For example, if we have a Solana RPC canister (similar to the EVM one), or when we change the code to not re-load the same transactions twice but guarantee that the data are correct.

@AntonioVentilii AntonioVentilii requested a review from a team as a code owner March 6, 2025 18:43

Choose a reason for hiding this comment

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

PR Overview

This PR reduces the Solana wallet RPC calls by increasing the delay interval to one minute, which helps reduce costs associated with RPC calls.

  • Introduces a new constant SOL_WALLET_TIMER_INTERVAL_MILLIS set to one minute.
  • Updates the Solana wallet scheduler and its test spec to use the new timer interval.

Reviewed Changes

File Description
src/frontend/src/lib/constants/app.constants.ts Adds a new constant to delay Solana wallet RPC calls.
src/frontend/src/sol/schedulers/sol-wallet.scheduler.ts Switches the scheduler to use the new Solana wallet timer interval.
src/frontend/src/tests/sol/schedulers/sol-wallet.scheduler.spec.ts Modifies tests to reflect the updated timer interval for Solana wallets.

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

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.

1 participant