Skip to content

Conversation

@lorem-ipsumm
Copy link
Contributor

In reference to: #2316

Fixed ProtocolCategoryFilter to account for child protocols:

  • The hook is now pulling a complete list of categories that includes the categories for child protocols.
  • filterProtocolsByCategory returns a list of protocols that are filtered and now checks to see if any of the child protocols are also in the filter

This seems to be working on my end, but please let me know if there are any other issues

@mintdart
Copy link
Contributor

mintdart commented Dec 3, 2025

if i select a category and assume a parent protocol has 3 child protocols, but only 2 child protocols are in selected category

then tvl of that parent protocol should be sum of tvl of 2 child protocols in selected category, not sum of tvl of all 3 child protocols

Screenshot 1 tvl of somnex here is wrong if you select `Dexs` not just tvl, we need to update all other metrics like tvl change, fees, revenue etc

@lorem-ipsumm
Copy link
Contributor Author

Right that makes sense. Would this be acceptable? This is copying the same functionality that you have on the fees page inside of src/containers/DimensionAdapters/AdapterByChain.tsx which breaks the child protocols into their own protocols (removes nesting) when the filter is active and applicable to the protocols in the filter.

Admittidely this makes my code a little redundant but I think having the category filtering code modular in its own hook and component could be better long term if you guys want to add the category filter anywhere else

image

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.

2 participants