Skip to content

Resolve ZcashNames (.zec) in Zcash send and tx history#6000

Merged
j0ntz merged 6 commits intodevelopfrom
jon/feat/zcash-names
Apr 28, 2026
Merged

Resolve ZcashNames (.zec) in Zcash send and tx history#6000
j0ntz merged 6 commits intodevelopfrom
jon/feat/zcash-names

Conversation

@j0ntz
Copy link
Copy Markdown
Contributor

@j0ntz j0ntz commented Apr 24, 2026

CHANGELOG

Does this branch warrant an entry to the CHANGELOG?

  • Yes
  • No

Dependencies

none

Requirements

If you have made any visual changes to the GUI. Make sure you have:

  • Tested on iOS device
  • Tested on Android device
  • Tested on small-screen device (iPod Touch)
  • Tested on large-screen device (tablet)

Description

Asana: https://app.asana.com/1/9976422036640/project/1213880789473005/task/1214252169890166

Adds ZcashNames (ZNS) — like ENS but for Zcash — to the Zcash send flow and transaction display.

  • Forward lookup: typing alice.zec (or any .zec name) in AddressTile2 / AddressModal for a Zcash wallet resolves it to the registered unified address. Mirrors the existing ENS / Unstoppable Domains / Zano-alias hooks. Silent fallback to parseUri on miss.
  • Reverse lookup: a new useZnsName hook async-resolves Zcash recipient addresses to their registered .zec name (with in-memory cache + in-flight dedupe) and renders it on the transaction list row and the transaction details screen when no metadata name is set.
  • Persistence: the entered ZNS name lives on spendTarget.otherParams.znsName and is propagated into metadata.name on broadcast — same pattern as zanoAlias / fioAddress.
  • Implementation: pure GUI integration via zcashname-sdk@^0.7.2. No react-native-zcash or native code changes. The SDK ships pure-JS deps (bech32, @noble/ed25519); both are added to the Jest transformIgnorePatterns whitelist so the test suite still loads them.

Pre-existing lint warnings in TransactionListRow.tsx are addressed in the first commit so the file can be removed from the warning suppression list cleanly. Verified locally with yarn prepare, yarn lint, and yarn test. Device-level UI verification pending.


Note

Medium Risk
Adds a new external name-resolution dependency (zcashname-sdk) and integrates it into send/address parsing and transaction display, which could affect address handling and UI correctness for Zcash sends. Risk is mitigated by gating to zcash wallets, fallbacks to normal URI parsing, and in-memory caching with logout resets.

Overview
Enables ZcashNames resolution for Zcash wallets: .zcash inputs are forward-resolved to addresses in AddressTile2/AddressModal, preserved as spendTarget.otherParams.znsName, and surfaced in send confirmation/metadata alongside existing FIO/Zano patterns.

Adds reverse lookup via new useZnsName (with in-memory cache + in-flight dedupe) to display recipient ZNS names in TransactionListRow and TransactionDetailsScene when no explicit metadata name exists, and clears ZNS caches/client on logout. Updates copy to dynamically list supported name services in the address modal, and adjusts Jest transforms/deps (zcashname-sdk, @noble/ed25519) to keep tests/lint working.

Reviewed by Cursor Bugbot for commit 44b5c23. Bugbot is set up for automated code reviews on this repo. Configure here.

Comment thread src/components/themed/TransactionListRow.tsx
Comment thread src/hooks/useZnsName.ts
@j0ntz j0ntz force-pushed the jon/feat/zcash-names branch from 0ccd68b to b48db4d Compare April 25, 2026 01:14
Comment thread src/components/modals/AddressModal.tsx
Comment thread src/util/zns.ts
Comment thread src/locales/strings/enUS.json Outdated
Comment thread src/components/scenes/TransactionDetailsScene.tsx
Comment thread src/util/zns.ts
@j0ntz j0ntz force-pushed the jon/feat/zcash-names branch from ceda6c1 to e906437 Compare April 27, 2026 21:27
Comment thread src/components/themed/TransactionListRow.tsx
Comment thread src/locales/strings/enUS.json Outdated
@j0ntz j0ntz force-pushed the jon/feat/zcash-names branch 2 times, most recently from 2e8cab1 to e655ef0 Compare April 27, 2026 23:01
@j0ntz j0ntz changed the base branch from develop to master April 27, 2026 23:38
@j0ntz j0ntz force-pushed the jon/feat/zcash-names branch from 7dbc929 to 96f368e Compare April 27, 2026 23:57
Comment thread src/hooks/useZnsName.ts
Comment thread src/components/modals/AddressModal.tsx Outdated
@j0ntz j0ntz force-pushed the jon/feat/zcash-names branch 3 times, most recently from 987daf2 to f32a1f7 Compare April 28, 2026 00:22
Comment thread ios/Podfile
unless existing_defs.include?('_LIBCPP_ENABLE_REMOVED_ALLOCATOR_CONST=1')
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] = existing_defs + ['_LIBCPP_ENABLE_REMOVED_ALLOCATOR_CONST=1']
end

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.

this commit can be dropped. changes were already merged

Comment thread src/locales/strings/enUS.json Outdated
"get_started_button": "Get Started",
"not_now_button": "Not Now",
"scan_address_modal_title": "Enter Recipient FIO, ENS, or Public Address",
"scan_address_modal_title": "Enter Recipient ZEC, ENS, or Public Address",
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.

Leave FIO there

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.

I see this was fixed later on

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'll squash the two

const handleChangeAddress = useHandler(async () => {
const nameServices: string[] = []
if (fioPlugin != null) nameServices.push('FIO')
if (coreWallet.currencyInfo.pluginId === 'ethereum')
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.

Funny, this matches current behavior but is actually wrong. ENS is multi chain, including non-EVM chains, and works correctly in the address modal. Here in the address tile we've limited ENS lookup to to only ethereum wallets.

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.

probably not worth fixing on a tight deadline but worth fixing later

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@j0ntz j0ntz force-pushed the jon/feat/zcash-names branch 2 times, most recently from c568391 to 9e416c2 Compare April 28, 2026 21:10
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 9e416c2. Configure here.

Comment thread src/components/tiles/AddressTile2.tsx
@j0ntz j0ntz force-pushed the jon/feat/zcash-names branch 2 times, most recently from c2b9d62 to 873884c Compare April 28, 2026 22:42
@j0ntz j0ntz changed the base branch from master to develop April 28, 2026 22:46
j0ntz added 6 commits April 28, 2026 15:46
Localize scan_address_modal_title and add scan_address_modal_title_1s

Hand-translated alongside the en_US source-of-truth update from the prior commit. Goes against the usual Crowdin-only-edits-translations practice; that's intentional — Crowdin is being phased out, so editing locale JSON directly here is fine.
@j0ntz j0ntz force-pushed the jon/feat/zcash-names branch from 873884c to 44b5c23 Compare April 28, 2026 22:47
@j0ntz j0ntz merged commit 73fe270 into develop Apr 28, 2026
3 of 4 checks passed
@j0ntz j0ntz deleted the jon/feat/zcash-names branch April 28, 2026 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants