Skip to content

Commit

Permalink
Merge pull request #36 from Zilliqa/search-by-tx-hash-without-0x
Browse files Browse the repository at this point in the history
(feat): Allow searching for tx hashes without 0x prefix.
  • Loading branch information
mtbc committed May 1, 2024
2 parents ab27df4 + 5306083 commit 23aaaae
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/search/search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,9 @@ const doSearch = async (q: string, navigate: NavigateFunction) => {
if (isHexString(q, 32)) {
navigate(`/tx/${q}`);
return;
} else if (isHexString(`0x${q}`, 32)) {
navigate(`/tx/0x${q}`);
return;
}

// Block number?
Expand Down

0 comments on commit 23aaaae

Please sign in to comment.