File tree Expand file tree Collapse file tree
explorer/lib/explorer_web/components Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,13 +11,17 @@ defmodule SearchComponent do
1111 |> case do
1212 { :ok , hash } ->
1313 cond do
14- # See if the hash belongs to a proof
14+ # See if the hash belongs to a proof in a batch
15+ # If so, redirect to search to show all the batches where this proofs exists
1516 Proofs . get_number_of_batches_containing_proof ( hash ) > 0 ->
17+ { :noreply , push_navigate ( socket , to: ~p" /search?q=#{ hash } " ) }
18+
19+ # See if the hash belongs to the root of a batch
20+ Batches . get_batch ( % { merkle_root: hash } ) != nil ->
1621 { :noreply , push_navigate ( socket , to: ~p" /batches/#{ hash } " ) }
1722
1823 # See if the hash belongs to an aggregated proof merkle root
1924 ( proof = AggregatedProofs . get_newest_aggregated_proof_by_merkle_root ( hash ) ) != nil ->
20- Logger . debug ( proof )
2125 { :noreply , push_navigate ( socket , to: ~p" /aggregated_proofs/#{ proof . id } " ) }
2226
2327 # Finally, see if the hash belongs to a proof of an aggregated proof
You can’t perform that action at this time.
0 commit comments