@compass-labs/widgets 0.1.44 → 0.1.45

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -4960,6 +4960,7 @@ function EarnAccount({
4960
4960
  defaultMarketTab = "variable",
4961
4961
  allowedVariableMarkets,
4962
4962
  allowedFixedMarkets,
4963
+ tokenSymbols,
4963
4964
  chain: chainProp,
4964
4965
  height = "600px"
4965
4966
  }) {
@@ -5193,7 +5194,11 @@ function EarnAccount({
5193
5194
  ...pendleMarketsQuery.data || [],
5194
5195
  ...vaultsQuery.data || []
5195
5196
  ];
5196
- const filteredTabMarkets = allMarkets.filter((m) => {
5197
+ const tokenFilteredMarkets = tokenSymbols && tokenSymbols.length > 0 ? (() => {
5198
+ const allowed = new Set(tokenSymbols.map((s) => s.toUpperCase()));
5199
+ return allMarkets.filter((m) => allowed.has(m.underlyingToken.toUpperCase()));
5200
+ })() : allMarkets;
5201
+ const filteredTabMarkets = tokenFilteredMarkets.filter((m) => {
5197
5202
  if (marketTab === "variable") {
5198
5203
  if (m.type === "pendle") return false;
5199
5204
  if (allowedVariableMarkets && !allowedVariableMarkets.includes(m.id)) return false;