Skip to content

Fix registration date error#139

Open
arnaud-eb wants to merge 7 commits into
ensdomains:masterfrom
arnaud-eb:fix-registration-date-error
Open

Fix registration date error#139
arnaud-eb wants to merge 7 commits into
ensdomains:masterfrom
arnaud-eb:fix-registration-date-error

Conversation

@arnaud-eb
Copy link
Copy Markdown

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

Comment thread src/registrar.js Outdated
ret.gracePeriodEndDate = gracePeriodEndDate
}
}
if (legacyEntry.registrationDate && permEntry.registrationDate) {
Copy link
Copy Markdown
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
Copy Markdown
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