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 registration date error #139

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

arnaud-eb
Copy link

Fixes ensdomains/ens-app#1331

This PR:

  • Adds method in class Registrar to query events
  • Parses NameRegistered events from permanent registrar filtered by selected subdomain
  • If subdomain previously registered in legacy auction-based registrar, takes block timestamp of last emitted NameRegistered event as registration date for selected subdomain

Before
image
After
image

src/registrar.js Outdated
@@ -233,6 +242,9 @@ export default class Registrar {
ret.gracePeriodEndDate = gracePeriodEndDate
}
}
if (legacyEntry.registrationDate && permEntry.registrationDate) {
Copy link
Member

Choose a reason for hiding this comment

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

An auction for this name was started in 2018, but the auction never completed. The name was first registered recently, but the manager shows a registration date in 2018.
Doesn't this pick permEntry.registrationDate, regardless of auction completed or not?

For example, apt-get.eth was one of the names registered during the auction but showing the last registered name using your PR branch (on the left).
Screenshot 2021-12-15 at 12 34 58

Copy link
Author

Choose a reason for hiding this comment

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

Thank you! Yes, you are right. After having a closer look, I wonder if the ens manager app should even display the registration date when the auction never completed in the legacy registrar to remain consistent with current behavior of permanent registrar (i.e. registration date is not reported for names registered with permanent registrar). That could be a new feature though. Last commit resets the registration date to 0 when the auction never finalized so that the registration date does not show up. Finally, I am not sure if this validity check should be implemented in the ensdomains/ui library or in the ens manager app (getRegistrarEntry() in resolvers.js).

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.

Manager incorrectly reports registration dates for expired names
2 participants