Conversation
- Add ContactsScene with list, add, edit, and delete functionality - Add ManageContactScene for creating and editing contacts - Add ContactService, ContactStore, and ContactRecord for data persistence - Add ContactsRequest with chain filtering (EVM chains compatibility) - Show contacts in Transfer Recipient scene filtered by chain - Pass memo from contacts to transfer flow via RecipientAddress - Add validation: disable save button when name/address empty - Validate address and clear memo when network changes - Remove unused SystemImage icons - Use address as Contact ID for uniqueness
Implements one-to-many relationship between Contact and ContactAddress, allowing contacts to have multiple addresses across different chains. Adds QR scanner support for address input and proper localization.
…ment-contacts # Conflicts: # Packages/PrimitivesComponents/Sources/Extensions/SwapProviderType+Gemstone.swift # Packages/Style/Sources/Extentions/Images+SystemImage.swift # Packages/Style/Sources/SystemImage.swift # core
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 delivers a significant new 'Contacts' functionality, empowering users to efficiently manage their frequently used addresses. It provides a centralized place to store contact details and multiple associated blockchain addresses, which can then be seamlessly utilized during the asset transfer process. The implementation includes a new Swift package, dedicated UI scenes, robust ViewModel logic, and a persistent storage solution, all designed to enhance user convenience and streamline transaction workflows. 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
Activity
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
This pull request introduces a comprehensive 'Contacts' feature, which is well-structured with new scenes, view models, and database integration. The code quality is high, and it integrates cleanly with existing features like Settings and Transfers. My feedback focuses on improving error handling to provide a more robust user experience and ensuring all user-facing strings are properly localized for maintainability.
Replace hardcoded "Contacts" strings with Localized.Contacts.title and add empty state localization for contacts list.
bca9a7f to
767a5f0
Compare
Introduce createdAt/updatedAt to Contact and propagate the change through primitives, test kit and DB records; remove description from ContactAddress. Split contact persistence into addContact/updateContact in ContactService and ContactStore (update ContactRecord schema and ContactAddressRecord columns/logic). Refactor recipient UI/models by adding AssetImageTitleViewModel/View and new section view models (ContactRecipientSectionViewModel, WalletRecipientSectionViewModel), replace previous ContactRecipientViewModel, and update Receive/Recipient scenes and view models to use the new components. Add unit tests for the new section view models. Also add Chain EVM helpers, update ContactsRequest to consider compatible EVM chains, and remove the deprecated Stream newAssets event handling.
767a5f0 to
392fed8
Compare
Refactor ManageContactAddressViewModel to remove the internal addressId and build ContactAddress via a new ContactAddress.new factory (id = chain.rawValue + "_" + address). Simplify view model logic (always enable save and remove hasChanges branch) and keep address checksum behavior. Add Contact+Primitives extension that provides the factory. Update ContactAddressRecord table schema to add onUpdate: .cascade for contactId and add a foreign key reference from address to AssetRecord with cascade on delete/update. Simplify ContactsRequest chain filtering to a direct equality check and remove the compatibleChains helper.
Compute and apply address-level diffs when updating contacts so removed addresses are deleted instead of left orphaned. ContactService.updateContact now fetches existing address IDs, calculates a SyncDiff, and passes deleteAddressIds to the store before syncing names. ContactStore.updateContact signature was changed to accept deleteAddressIds, deletes matching address records, upserts provided addresses, and a new getAddressIds(contactId:) helper was added. A Contact.new factory was introduced to centralize Contact creation (preserving createdAt for edits and setting updatedAt). ManageContactViewModel was simplified: added Mode.contact accessor, currentContact now uses Contact.new with existing createdAt when editing, and the save-button enablement logic was simplified. ContactRecipientSectionViewModel grouping now uses the raw address string (no lowercasing) to preserve original casing.
f8a6836 to
2566d24
Compare
- Update ContactsRequest to conform to DatabaseQueryable - Replace observeQuery with bindQuery in ContactsScene and RecipientScene - Use ObservableQuery in ContactsViewModel and RecipientSceneViewModel
2566d24 to
06e8e68
Compare
Close: #469