Skip to content
This repository was archived by the owner on Mar 26, 2026. It is now read-only.

Show internal wallet name for transfers between own wallets#1834

Open
DRadmir wants to merge 2 commits intomainfrom
1830-show-name-of-the-wallet-if-internal-transfer-between-wallets
Open

Show internal wallet name for transfers between own wallets#1834
DRadmir wants to merge 2 commits intomainfrom
1830-show-name-of-the-wallet-if-internal-transfer-between-wallets

Conversation

@DRadmir
Copy link
Copy Markdown
Contributor

@DRadmir DRadmir commented Mar 26, 2026

  • Add walletId column to AddressRecord with FK to wallets table
  • Save sender and recipient wallet names on transfer execution
  • Resolve internal wallet names on confirm screen via WalletService fallback
  • Add internalWallet address type with wallet icon in UI
Simulator Screenshot - iPhone 17 Pro Max - 2026-03-26 at 16 36 39 Simulator Screenshot - iPhone 17 Pro Max - 2026-03-26 at 16 36 44 Simulator Screenshot - iPhone 17 Pro Max - 2026-03-26 at 16 36 52

Close: #1830

- Add walletId column to AddressRecord with FK to wallets table
- Save sender and recipient wallet names on transfer execution
- Resolve internal wallet names on confirm screen via WalletService fallback
- Add internalWallet address type with wallet icon in UI
@DRadmir DRadmir self-assigned this Mar 26, 2026
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, 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 significantly enhances the user experience for transfers between a user's own wallets. By integrating WalletService into the confirmation flow and persisting internal wallet names, the system can now intelligently display user-friendly wallet names instead of raw addresses. This change also includes a database schema update and UI adjustments to visually distinguish internal wallet addresses, making transfers more intuitive and less error-prone.

Highlights

  • Internal Wallet Name Resolution: Implemented logic to resolve and display internal wallet names on the transfer confirmation screen, using WalletService as a fallback if AddressNameService doesn't find a match.
  • Database Schema Update: Added a walletId column to the AddressRecord table with a foreign key constraint to the WalletRecord table, enabling better tracking of addresses associated with internal wallets.
  • Transfer Execution Enhancements: Modified the TransferExecutor to save sender and recipient internal wallet names to the AddressStore upon successful transfer execution, ensuring these names are persisted.
  • UI Representation for Internal Wallets: Introduced a new internalWallet address type and updated UI components to display a distinct wallet icon for these addresses, improving visual clarity for users.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request integrates "internal wallets" into the application's address resolution and transfer flow. It introduces a new AddressType.internalWallet and updates the AddressNameService and WalletService to support storing and retrieving internal wallet addresses, including a database migration to add a walletId to address records. The ConfirmService now leverages the WalletService to resolve internal wallet names, and the TransferExecutor automatically saves internal wallet addresses during transfer operations. UI components like ConfirmRecipientViewModel and AddressListItemViewModel have been updated to reflect this new address type. A suggestion was made to improve the readability of a switch statement in TransferExecutor.swift by using a default case.

Comment on lines +168 to +173
switch input.data.type {
case .transfer, .transferNft:
break
case .swap, .tokenApprove, .stake, .account, .perpetual, .earn, .generic, .deposit, .withdrawal:
return
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For improved readability and conciseness, you can simplify this switch statement by using a default case to handle all transaction types that should cause an early return. This avoids explicitly listing all of them and makes the intent clearer.

Suggested change
switch input.data.type {
case .transfer, .transferNft:
break
case .swap, .tokenApprove, .stake, .account, .perpetual, .earn, .generic, .deposit, .withdrawal:
return
}
switch input.data.type {
case .transfer, .transferNft:
break
default:
return
}

…-name-of-the-wallet-if-internal-transfer-between-wallets
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Show name of the wallet if internal transfer between wallets

1 participant