pancake-frontend icon indicating copy to clipboard operation
pancake-frontend copied to clipboard

perf: Dont fetch v2 expired pools data and make price fetcher unique

Open memoyil opened this issue 4 months ago • 2 comments


PR-Codex overview

This PR focuses on optimizing the fetching of currency prices and pool data by eliminating duplicate requests and improving performance through the use of lodash's uniqBy function.

Detailed summary

  • Added uniqBy from lodash to filter unique currency parameters in usdPriceBatcher.
  • Renamed totalSupplyCalls to endTimestampCalls.
  • Updated calls to use activeValidPools instead of validPools.
  • Removed redundant endTimestampCalls and adjusted related logic.
  • Simplified Promise.all calls for fetching data.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

memoyil avatar Oct 24 '24 09:10 memoyil