Skip to content

feat(zcash): add address page with graceful RPC degradation - #412

Merged
MatiasOS merged 4 commits into
issue-398-zcash-searchfrom
issue-398-zcash-address
Nov 21, 2026
Merged

MatiasOS merged 4 commits into
issue-398-zcash-searchfrom
issue-398-zcash-address

Conversation

@MatiasOS

@MatiasOS MatiasOS commented Sep 14, 2026 •

Copy link
Copy Markdown
Member

Description

Adds the Zcash address page at /zec/address/:address and /tzec/address/:address. With this PR the stack covers every acceptance criterion in #398, including the last one: address and shielded views degrade gracefully when the RPC endpoint rejects a method.

What the page shows depends on the address type:

  • Transparent (t1/t3, tm/t2): balance, total received, unspent outputs and history, all from Zebra's address index.
  • Unified (u1, utest1): its receivers, from z_listunifiedreceivers. If it has a transparent receiver, that receiver's balance and history are shown too.
  • Sapling and Sprout: a notice that shielded balances and history aren't publicly visible. The page makes no RPC calls for these.
  • TEX and unrecognized input: a notice explaining why nothing can be looked up.

Graceful degradation. Each section of the page reports whether its data was available.

  • Hosted gateways such as Tatum block the whole address index with -32601. In that case the page replaces three empty rows with one notice. It explains that a self-hosted Zebra node is needed and links to RPC settings.
  • Any other failure shows a message in the affected section and a retry button.

Related Issue

Part of #398 (closed by #413). Stacked on #411.

Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Refactoring
  • Performance improvement
  • Other (please describe):

Changes Made

  • ZcashAddressPage and ZcashAddressDisplay.
  • Typed i18n keys for address types, added to the shared labels.ts.
  • Routes and lazy exports for zec|tzec/address/:address.
  • zcash locale strings and tooltips.zcash.address in all 5 locales.
  • Styles for the address notices and the receiver list.
  • Changes to the Zcash RPC mock:
    • By default, the address-index methods now return Tatum's Method not found error.
    • With addressIndex: true, it serves them the way a self-hosted node would.
  • A hermetic e2e spec, e2e/tests/shared/mocked/zcash-address.spec.ts. It includes the address search test that was deferred from feat(search): route Zcash addresses and block hashes #411.

Screenshots (if applicable)

Checked locally against mocked RPC data in these states:

  • a blocked address index
  • a transparent address with the index available
  • a unified address, at desktop width and at 400px
  • a Sapling address

Checklist

  • I have run npm run format:fix and npm run lint:fix
  • I have run npm run typecheck with no errors
  • I have run tests with npm run test:run
  • I have tested my changes locally
  • I have updated documentation if needed
  • My code follows the project's architecture patterns

Additional Notes

Review follow-up

  • One index probe. On a hosted gateway, getaddressbalance stands in for the whole address index, and the answer is remembered: later addresses make no index calls.
  • A unified address's balance is labelled Transparent Balance, since its other receivers are shielded.
  • When the gateway can't decode unified addresses, the page explains it and links to the RPC settings.
  • The brackets around the transparent-receiver note are in the translations (full-width in ja and zh).
  • History pages through every transaction instead of stopping at 50.
  • Generic utxo-* class names alias the btc-* rules, so the page doesn't depend on Bitcoin class names. Bitcoin markup is unchanged.
  • The page aborts on navigation, and its loader Retry re-runs the lookup.
  • E2E: a single index probe, the remembered answer, the receivers notice and history paging.

Tests after the follow-up

  • npm run test:run: 199 passing.
  • Hermetic Zcash e2e specs at this PR: 36 passed, no retries.

@github-actions

github-actions Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

🚀 Preview: https://pr-412--openscan.netlify.app
📝 Commit: 8de2d81583aaa6d8d18594fff3b49748171db382

Each section reports its own availability. When a hosted gateway blocks Zebra's address index, one notice explains that a self-hosted node is needed instead of rendering empty rows; shielded addresses explain why their balances are private.
- On a hosted gateway one getaddressbalance probe stands in for the
  whole address index, and the answer is remembered: later addresses
  make no index calls.
- A unified address's balance is labelled "Transparent Balance", since
  its other receivers are shielded.
- When the gateway can't decode unified addresses, the page explains it
  and links to the RPC settings.
- The brackets around the transparent receiver note live in the
  translations (full-width in ja and zh).
- History pages through every transaction instead of stopping at 50.
- Generic utxo-* class names alias the btc-* rules, so the page no
  longer depends on Bitcoin class names.
- The page aborts on navigation and its loader retry re-runs the lookup.
- E2E: a single index probe, the remembered answer, the receivers
  notice and history paging.
@MatiasOS
MatiasOS force-pushed the issue-398-zcash-address branch from 9ac4f59 to 8de2d81 Compare November 20, 2026 23:44
@MatiasOS
MatiasOS merged commit 7ae49ff into dev Nov 21, 2026
7 checks passed
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.

1 participant