Page MenuHomePhabricator

[explorer] Properly handle the search bar
ClosedPublic

Authored by Fabien on Sep 5 2023, 19:48.

Details

Reviewers
tobias_ruck
Group Reviewers
Restricted Project
Commits
rABCd9dab1dfc769: [explorer] Properly handle the search bar
Summary

The current search feature is is split between the rust server search function and some hacky js which is mostly forwarding the request, plus:

  • Allow for searching by block height
  • Allow for prefixless addresses

This diff fixes both of the missing search features while removing the hacky js code. This makes it possible to change the prefix and keep the explorer search feature working.

Test Plan

Run the explorer and search for block height, block hash, txid, address with and without prefix (including etoken: addresses).

Diff Detail

Repository
rABC Bitcoin ABC
Branch
explorer_search_blockheight
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 24948
Build 49484: Build Diff
Build 49483: arc lint + arc unit

Event Timeline

Fabien requested review of this revision.Sep 5 2023, 19:48
tobias_ruck added a subscriber: tobias_ruck.
tobias_ruck added inline comments.
web/explorer/explorer-server/src/server.rs
519–521

Something like this would be a little bit easier to read for a Rust dev (dito for the other parse)

This revision now requires changes to proceed.Sep 5 2023, 21:50
This revision is now accepted and ready to land.Sep 7 2023, 09:37
This revision was automatically updated to reflect the committed changes.