interface icon indicating copy to clipboard operation
interface copied to clipboard

Add support for both ENS and UNS domains in address watch-only mode

Open jim-unstoppable opened this issue 2 years ago • 2 comments

General Changes

  • Users can now enter in UNS NFT domains such as "0xjimbob.nft" as well as ENS NFT domains such as "0xjimbob.eth"
  • UNS will behave just like ENS. It will lookup the owner of the domain and look for that address
  • all UI and error handling once submitted is unaffected

Developer Notes

  • Added the UNS logic inline with the prior ENS logic, did a slight refactor of a section in handleWatchAddress to handle positive check for .eth instead of the prior negative check for not .eth. This makes it more extensible for all naming systems
  • Error messaging follows same structure as ENS implementation
  • Uses the Unstoppable Domains JS resolution library (open source)

Reviewer Checklist

Please ensure you, as the reviewer(s), have gone through this checklist to ensure that the code changes are ready to ship safely and to help mitigate any downstream issues that may occur.

  • [ ] End-to-end tests are passing without any errors
  • [ ] Code style generally follows existing patterns
  • [ ] Code changes do not significantly increase the application bundle size
  • [ ] If there are new 3rd-party packages, they do not introduce potential security threats
  • [ ] If there are new environment variables being added, they have been added to the .env.example file as well as the pertinant .github/actions/* files
  • [ ] There are no CI changes, or they have been approved by the DevOps and Engineering team(s)
  • [ ] Code changes have been quality checked in the ephemeral URL
  • [ ] QA verification has been completed
  • [ ] There are two or more approvals from the core team
  • [ ] Squash and merge has been checked

jim-unstoppable avatar Oct 13 '22 21:10 jim-unstoppable

There are 2 issues with the packages added in this PR: 1.) The @unstoppabledomains/resolution package adds 85kb to the bundle size which is ~15% of the total app size 2.) The @unstoppabledomains/tldsresolverkeys package does not expose types which is causing the import error, you can checkout this guide for instructions on adding them

defispartan avatar Oct 18 '22 04:10 defispartan

@defispartan - I took a shot with another method using a UD REST API, so that there is no longer any extra packages needed. Is this any better? Happy to adjust if you need anything

jim-unstoppable avatar Oct 20 '22 22:10 jim-unstoppable

Hi Team - checking back in on this. Any updates on the review?

jim-unstoppable avatar Nov 23 '22 19:11 jim-unstoppable

@jim-unstoppable There's a build error, once that's fixed everything else looks good

You can test locally with yarn build

defispartan avatar Feb 08 '23 06:02 defispartan

Thanks - had some TypeScript errors, pushed a fix

jim-unstoppable avatar Feb 08 '23 19:02 jim-unstoppable

✅ CI run has succeded! You can find tests and deployment logs at https://github.com/aave/interface/actions/runs/4131116010'

github-actions[bot] avatar Feb 09 '23 04:02 github-actions[bot]

📦 Next.js Bundle Analysis

This analysis was generated by the next.js bundle analysis action 🤖

⚠️ Global Bundle Size Increased

Page Size (compressed)
global 497.31 KB (🟡 +240 B)
Details

The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!

github-actions[bot] avatar Feb 09 '23 05:02 github-actions[bot]

  • Ipfs hash: bafybeihlyhxo6nztaca5hqqunzpheihwdbq6lpovu5hcdft2u2djoxn2my
  • Ipfs preview link: https://bafybeihlyhxo6nztaca5hqqunzpheihwdbq6lpovu5hcdft2u2djoxn2my.ipfs.cf-ipfs.com/

github-actions[bot] avatar Feb 09 '23 05:02 github-actions[bot]