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: detect desynced expiry + show banner #806

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open

Conversation

TateB
Copy link
Collaborator

@TateB TateB commented Aug 9, 2024

relies on thorin pr: ensdomains/thorin#156

main issue:

  • a 2ld .eth name can have differing expiries between registrar and namewrapper (namewrapper can be lower)
  • if namewrapper expiry has passed, ownership shows as 0x0 because the name is still at the namewrapper level
  • in this situation, various parts of the app break because they assume it's not possible, and the name becomes effectively locked (from the app's context)
  • the user has no recourse for fixing it

fix:

  • get ownership value regardless of expiry
    • allows showing the owner so the user doesn't panic, and so the rest of the UI doesn't behave too weirdly
  • add new nametype for this specific desync situation
    • with no ability for any actions (i.e. send/edit)
  • show banner for desynced name with fix button
    • fix button is the same as just renewing the name for 0 duration (with 0 value)

changes:

  • useOwner now has a forceUnexpired parameter which allows fetching ownership regardless of expiry (for both wrapper+registrar)
  • the useOwner call in useBasicName now fetches ownership regardless of expiry
    • not sure if this has unintended consequences, but we were doing something kinda similar for grace period anyway
  • new Misconfigured name banner with an button for repair if a name is detected as having a desynced expiry
  • add syncNameExpiry transaction
  • updated styled-components/react-transition-state (from thorin req)

@TateB TateB requested a review from sugh01 as a code owner August 9, 2024 02:00
Copy link

sonarcloud bot commented Oct 19, 2024

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.

2 participants