Skip to content

Commit

Permalink
fix: Don't set ens filter to on sale by default on the current accoun…
Browse files Browse the repository at this point in the history
…t page
  • Loading branch information
fzavalia committed Feb 14, 2024
1 parent 9008017 commit a940a89
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
14 changes: 7 additions & 7 deletions webapp/src/components/AssetFilters/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ const WearablesFilters = [
]

const EmotesFilters = [
...WearablesFilters.filter(
filter =>
filter !== AssetFilter.BodyShape &&
filter !== AssetFilter.Network &&
filter !== AssetFilter.More &&
filter !== AssetFilter.OnlySmart
),
AssetFilter.Rarity,
AssetFilter.Status,
AssetFilter.Price,
AssetFilter.Collection,
AssetFilter.Creators,
AssetFilter.OnSale,
AssetFilter.More,
AssetFilter.PlayMode
]

Expand Down
9 changes: 7 additions & 2 deletions webapp/src/modules/routing/sagas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -696,10 +696,15 @@ function* deriveCurrentOptions(
// for ENS, if the previous page had `onlyOnSale` as `undefined` like wearables or emotes, it defaults to `true`, otherwise use the current value
newOptions = {
...newOptions,
assetType: AssetType.NFT,
onlyOnSale:
assetType: AssetType.NFT
}

// Only if the user is not in their own page, show ens on sale by default.
if (window.location.pathname !== locations.currentAccount()) {
newOptions.onlyOnSale =
previous.onlyOnSale === undefined ? true : current.onlyOnSale
}

break
}
default: {
Expand Down

0 comments on commit a940a89

Please sign in to comment.