Repository navigation
feat(search): route Zcash addresses and block hashes - #411
Merged
Merged
Conversation
7 of 12 tasks
MatiasOS
force-pushed
the
issue-398-zcash-search
branch
from
November 20, 2026 22:11
4c187c3 to
f4e3bb8
Compare
|
🚀 Preview: https://pr-411--openscan.netlify.app |
Zcash block hashes and txids are both 64 hex characters, so search keeps sending hashes to the transaction page, which now looks the hash up as a block and redirects when no transaction matches.
- The transaction page only tries a hash as a block when the node answered that no such transaction exists. A rate-limited or unreachable endpoint said nothing about the hash, so it no longer triggers a second round of retries (~90s and up to six requests). - A hash that is a block redirects to /block/<height> and hands the block it already fetched to the block page, which doesn't refetch it (and caches it when it already has a successor). - ZcashRpcError.answered tells definitive JSON-RPC answers apart from HTTP and network failures. - Search: isBitcoinTxid becomes isHex64Hash (shared in hashUtils with the transaction page), Zcash networks are matched with isZcashNetwork, addresses are checked against the selected network, and all-uppercase Bech32m addresses are lowercased. - E2E: one getblock per block-hash search, no block lookup for a rate-limited hash, and uppercase unified addresses.
MatiasOS
force-pushed
the
issue-398-zcash-search
branch
from
November 20, 2026 23:44
f4e3bb8 to
d72ca16
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Makes the network search box work on Zcash networks.
t1/t3,tm/t2), Sapling (zs1,ztestsapling1), unified (u1,utest1), Sprout (zc,zt) and TEX (tex1,textest1) addresses go to/{network}/address/:address. Before this change they were rejected as an invalid search. They're only recognized while a Zcash network is selected.Related Issue
Part of #398. Stacked on #410.
Type of Change
Changes Made
useSearch: recognizes Zcash addresses, using the existingisZcashAddressutil, when the selected network is Zcash.ZcashTransactionPage: ifgetrawtransactionfails for a 64-character hex hash, it triesgetblockwith that hash and redirects to the block page. Otherwise it shows the original error.e2e/fixtures/rpcMock.ts: function handlers can now returnrpcError(code, message), which answers with a JSON-RPC error instead of a result.e2e/tests/shared/mocked/zcash-search.spec.ts. It covers:Screenshots (if applicable)
N/A (no visual changes)
Checklist
npm run format:fixandnpm run lint:fixnpm run typecheckwith no errorsnpm run test:runAdditional Notes
npm run test:run: 151 passing.Review follow-up
getblockper block-hash search. The page redirects to/block/<height>and hands the block it already fetched to the block page, which doesn't refetch it.isBitcoinTxidis nowisHex64Hash(shared with the transaction page); Zcash networks are matched withisZcashNetwork; addresses are checked against the selected network, and all-uppercase Bech32m addresses are lowercased.HomeSearchBar(EVM-only, with its own network picker), anduseSearchonly runs on network pages.useSearchstill asks for a network when there isn't one.getblockper block-hash search, no block lookup for a rate-limited hash, and an uppercase unified address.Tests after the follow-up
npm run test:run: 199 passing.