Open
Conversation
Member
Author
|
@cursor update the assets Changelog to cater for the changes in my PR |
|
I've successfully updated the assets-controllers changelog to document the changes from your PR. Here's what I added: Updated: Added to [Unreleased] section:
The changelog entry properly documents the performance optimizations your PR introduces, including the deduplication of concurrent API calls, improved caching behavior, and the new reset functionality. The changes have been committed and pushed to the |
Co-authored-by: juan.gutierrez <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Explanation
Updated the code so that we do not make subsequent API calls to the same endpoint with the same params and so that we cache the response to avoid unnecessary re-fetching
References
https://consensyssoftware.atlassian.net/browse/ASSETS-2582
Checklist
Note
Medium Risk
Changes caching/refresh behavior for supported networks/currencies, which could lead to stale capability lists if callers relied on the previous always-refresh-in-background behavior. Concurrency deduping is low risk but touches shared request paths used by price and exchange-rate polling.
Overview
Improves Price API call efficiency by deduplicating concurrent
fetchSupportedNetworks()requests via an in-flight promise cache, and clearing that promise on completion/reset.Reduces background metadata traffic by only triggering non-blocking refreshes of supported networks/currencies from
fetchTokenPrices()/fetchExchangeRates()when no cached value exists, and adds a unit test ensuring concurrentsupportedNetworkscalls collapse to a single HTTP request (plus changelog entry).Written by Cursor Bugbot for commit 21e4322. This will update automatically on new commits. Configure here.