Add ENS name resolution support to Contacts#1729
Conversation
Integrate NameService into ManageContactAddressViewModel to allow resolving domain names (e.g., vitalik.eth) when adding contact addresses. Validates address on save if no name was resolved.
Summary of ChangesHello @DRadmir, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces support for Ethereum Name Service (ENS) and similar domain name resolution within the Contacts feature. It allows users to input human-readable domain names instead of raw blockchain addresses, which are then resolved to their corresponding addresses. The changes include updating the data flow to incorporate the Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
The pull request successfully integrates the NameService into the Contacts feature, allowing for ENS name resolution when adding contact addresses. The changes are well-implemented, including dependency injection of the NameService across relevant ViewModels and Views. The ManageContactAddressViewModel correctly handles the nameResolveState to manage button states and ensures proper address validation, prioritizing resolved addresses. Unit tests have been updated to cover the new name resolution logic, which is a good practice. Overall, the changes are clean, functional, and align with the stated objective.
gemcoder21
left a comment
There was a problem hiding this comment.
Make it reusable across 3 different screens
…omain-for-contacts
…servable Extract duplicated address input + name resolution logic from Transfer and Contacts into reusable AddressInputView + AddressInputViewModel in PrimitivesComponents. Refactor NameRecordViewModel from a simple struct to @observable class that owns resolve state and task, simplifying NameRecordView to a pure display component.
…lidation - Add ContactsNavigationView coordinator with push navigation for contact editing - Replace sheet-based contact editing with NavigationLink push (hides tab bar) - Keep sheet presentation for adding new contacts - Consolidate address sheet into ManageContactScene (remove duplication) - Replace StateButton with toolbar checkmark button matching iOS Contacts style - Unify isPresentingAddAddress/isPresentingContactAddress into single isPresentingAddress - Fix AddressInputViewModel.validate() to properly reject invalid addresses - Add Scenes.Contact for type-safe navigation - Add AddressInputViewModel unit tests
- Add semibold title and secondary subtitle styles to contact list items - Increase type-based asset image text size from 0.3 to 0.35
Integrate NameService into ManageContactAddressViewModel to allow resolving domain names (e.g., vitalik.eth) when adding contact addresses. Validates address on save if no name was resolved.