pancake-frontend
pancake-frontend copied to clipboard
perf: Dont fetch v2 expired pools data and make price fetcher unique
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
fromlodash
to filter unique currency parameters inusdPriceBatcher
. - Renamed
totalSupplyCalls
toendTimestampCalls
. - Updated calls to use
activeValidPools
instead ofvalidPools
. - 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}