-
Notifications
You must be signed in to change notification settings - Fork 9
ENS Names used in Zones page and Account panel #1407
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
Conversation
I think you should be able to test it locally by adding one of the Anvil accounts to metamask and transferring some of the test ETH to your account. That way you'd be able to mint your own zone. Outside of that, another option could be to mint the zone using the dev account and then transfer the zone 721 to your account by adding the zone721 contract to your Metamask. I think the transfer of fake eth is the easier option though |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we confirm how this performs when there are 100s+ of zones with unique addresses?
the page receives data updates multiple times a second, and if each of those updates causes an async external request for hundreds of addrs, it could get hairy.
ideally:
- the lookup would only occur for addresses that are on the screen (or soon will be)
- the lookups are cached so that the same address is not fetched multiple times whenever the component data changes
- we do not send out more than say 5 concurrent requests at a time
frontend/src/pages/index.tsx
Outdated
})); | ||
} | ||
}); | ||
}, [zones]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think this hook might get invalidated much more frequently than we would like for the kind of expensive lookup that is happening.
🤔
Could it be better to store it in something like zone.owner.ens when the zone is minted, then update it on their side whenever they connect or join their zone? |
nah i think you are on the right track with the fetching on demand, we just need to be careful with creating a storm of requests |
still TODO: only lookup addresses for zones that are visible on the screen
Since latest commit(s):
Linting still todo |
linted and ready |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this solves the problem of scale that Farms pointed out so LGTM. A comment I have which I think is separate from this PR is about the zone list updating every 2 seconds. I'm not sure if Farms fixed this when he did the big CSS overhaul but in the old version (that I was responsible for 😬) it would rerender all the zone rows each time the zone data came in. I guess we'd need to memoize the zone data as it shouldn't be frequently updating
ty :) Ah, this reminds me that I can remove the |
What
Uses ENS name if it can be found instead of the wallet address:
Zones Page
Account Panel
Notes
I don't know 100% if it's working on the zone page until it's in main because I can't mint a zone on my MetaMask account locally (I think?)