Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Don't set ens filter to on sale by default on the current accoun… #2132

Merged
merged 1 commit into from
Feb 14, 2024

Conversation

fzavalia
Copy link
Contributor

…t page

Closes #2129

Copy link

vercel bot commented Feb 14, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
marketplace ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 14, 2024 9:39am

Comment on lines 33 to 41
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
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the more filter so it shows the on sale filter on my account for emotes.

Removed the .filter and copied the required filters for emotes to prevent the case in which new filters are added to the wearable filters and we forget to remove it from the emote filters.

Comment on lines +702 to 706
// 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
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What was happening is that on your own account page, it was being set to only on sale, which then forced the only on sale on the other tabs.

@fzavalia fzavalia requested a review from cyaiox February 14, 2024 09:41
@coveralls
Copy link

Coverage Status

coverage: 67.059% (+0.009%) from 67.05%
when pulling a940a89 on fix/current-account-ens-on-sale-filter-bug
into 9008017 on master.

@fzavalia fzavalia merged commit b9e380f into master Feb 14, 2024
7 checks passed
@fzavalia fzavalia deleted the fix/current-account-ens-on-sale-filter-bug branch February 14, 2024 13:30
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.

[BUG] My Assets page fetching assets
3 participants