Skip to content

Conversation

@OGPoyraz
Copy link
Member

@OGPoyraz OGPoyraz commented Oct 22, 2025

Description

Similarly what's being done in MetaMask/metamask-extension#37047 this PR implements a short living cache for Name component to use after send flow.

Changelog

CHANGELOG entry: Show ENS name in the confirmation after picking ENS recipient in send flow

Related issues

Fixes: #19072

Manual testing steps

  1. Go to send flow
  2. Pick ENS recipient
  3. Proceed into confirmation - you should be able to see ENS in the confirmation now

Screenshots/Recordings

Before

After

Simulator.Screen.Recording.-.iPhone.16.Pro.-.2025-10-22.at.13.18.00.mov

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

Note

Adds a 5‑minute ENS resolution cache used post-send and surfaces cached ENS in Name display; integrates with validation and updates tests.

  • ENS caching (5 min TTL):
    • Add useSendFlowEnsResolutions with setResolvedAddress and getResolvedENSName to cache ENS per chainId:address.
  • Send flow integration:
    • Update useNameValidation to call setResolvedAddress(chainId, ensName, resolvedAddress) when isEvmSendType and ENS resolves.
  • Display name integration:
    • Update useDisplayName to read ensName via getResolvedENSName(variation, value) and prioritize it in name selection.
  • Tests:
    • New tests for cache storage, expiration, chain separation, overwrite behavior.
    • Extend useNameValidation tests to assert cache writes only for EVM/ENS.
    • Add useDisplayName test to verify ENS name is returned.

Written by Cursor Bugbot for commit c5a24a9. This will update automatically on new commits. Configure here.

@OGPoyraz OGPoyraz requested a review from a team as a code owner October 22, 2025 11:21
@metamaskbot metamaskbot added the team-confirmations Push issues to confirmations team label Oct 22, 2025
cursor[bot]

This comment was marked as outdated.

@jpuri
Copy link
Contributor

jpuri commented Oct 27, 2025

Hey @OGPoyraz : is it possible that we save the resolution as metadata in transaction, that will be better than caching resolution result ?

@sonarqubecloud
Copy link


if (resolvedAddress && isEvmSendType) {
// Set short living cache of ENS resolution for the given chain and address for confirmation screen
setResolvedAddress(chainId, to, resolvedAddress);
Copy link
Contributor

Choose a reason for hiding this comment

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

❤️

@OGPoyraz OGPoyraz added this pull request to the merge queue Nov 3, 2025
Merged via the queue into main with commit 4d7e238 Nov 3, 2025
85 checks passed
@OGPoyraz OGPoyraz deleted the ogp/19072 branch November 3, 2025 08:41
@github-actions github-actions bot locked and limited conversation to collaborators Nov 3, 2025
@metamaskbot metamaskbot added the release-7.59.0 Issue or pull request that will be included in release 7.59.0 label Nov 3, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.59.0 Issue or pull request that will be included in release 7.59.0 size-M team-confirmations Push issues to confirmations team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Display ENS names in Name component in mobile

5 participants