Skip to content

feat: use cache for token details and improve architecture#186

Merged
anxolin merged 1 commit intobalance-ssefrom
use-cache-for-token-details
Jan 16, 2026
Merged

feat: use cache for token details and improve architecture#186
anxolin merged 1 commit intobalance-ssefrom
use-cache-for-token-details

Conversation

@anxolin
Copy link
Copy Markdown
Contributor

@anxolin anxolin commented Jan 16, 2026

This PR addresses some leftovers from the hackathon.

Cache improvements

We remove a lot of RPC calls for getting over and over the: symbol, decimals, name

This info is highly cacheable and already part of a repository.

Architeture improvements

The API was depending directly from the repository layer, which should not be the case (should use the services).

Also, we have a more clear separation of reponsabilities between the ERC20 repo and the balances one.
The later is not loading token info anymore.

Test

  1. yarn start
  2. Input your wallet for gnosis chain and 2 tokens you like. On of them, you should have balance
  3. Press connect, make sure balances load
  4. Do a trade in CoW Swap selling 1 of the tokens and buying the other token
  5. Make sure the balances update
Screenshot at Jan 16 08-57-55

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Jan 16, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@anxolin anxolin changed the base branch from main to balance-sse January 16, 2026 08:59
@socket-security
Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​types/​uuid@​10.0.01001007081100

View full report

@anxolin anxolin marked this pull request as ready for review January 16, 2026 09:13
@anxolin anxolin requested a review from a team January 16, 2026 09:13
@anxolin anxolin merged commit 1d29ac8 into balance-sse Jan 16, 2026
8 of 9 checks passed
@anxolin anxolin deleted the use-cache-for-token-details branch January 16, 2026 09:13
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