From f3bd50d4ab3a16ad41ad4f1dfc7dc70ecfb0ece9 Mon Sep 17 00:00:00 2001 From: natsoni Date: Fri, 31 May 2024 13:37:30 +0200 Subject: [PATCH] Revert "Update search results ordering" This reverts commit 00838ea94762fb81de0eebe0cec3c3035ae0e279. --- .../search-form/search-form.component.ts | 6 --- .../search-results.component.html | 42 ++++++++----------- .../search-results.component.ts | 2 +- 3 files changed, 19 insertions(+), 31 deletions(-) diff --git a/frontend/src/app/components/search-form/search-form.component.ts b/frontend/src/app/components/search-form/search-form.component.ts index bcd5afb53..d345cb1e0 100644 --- a/frontend/src/app/components/search-form/search-form.component.ts +++ b/frontend/src/app/components/search-form/search-form.component.ts @@ -195,7 +195,6 @@ export class SearchFormComponent implements OnInit { const matchesTxId = this.regexTransaction.test(searchText) && !this.regexBlockhash.test(searchText); const matchesBlockHash = this.regexBlockhash.test(searchText); const matchesAddress = !matchesTxId && this.regexAddress.test(searchText); - const publicKey = matchesAddress && searchText.startsWith('0'); const otherNetworks = findOtherNetworks(searchText, this.network as any || 'mainnet', this.env); const liquidAsset = this.assets ? (this.assets[searchText] || []) : []; const pools = this.pools.filter(pool => pool["name"].toLowerCase().includes(searchText.toLowerCase())).slice(0, 10); @@ -204,10 +203,6 @@ export class SearchFormComponent implements OnInit { searchText = searchText.replace(/\//g, '-'); } - if (publicKey) { - otherNetworks.length = 0; - } - return { searchText: searchText, hashQuickMatch: +(matchesBlockHeight || matchesBlockHash || matchesTxId || matchesAddress || matchesUnixTimestamp || matchesDateTime), @@ -217,7 +212,6 @@ export class SearchFormComponent implements OnInit { txId: matchesTxId, blockHash: matchesBlockHash, address: matchesAddress, - publicKey: publicKey, addresses: matchesAddress && addressPrefixSearchResults.length === 1 && searchText === addressPrefixSearchResults[0] ? [] : addressPrefixSearchResults, // If there is only one address and it matches the search text, don't show it in the dropdown otherNetworks: otherNetworks, nodes: lightningResults.nodes, diff --git a/frontend/src/app/components/search-form/search-results/search-results.component.html b/frontend/src/app/components/search-form/search-results/search-results.component.html index e5db07670..35ce2a0a7 100644 --- a/frontend/src/app/components/search-form/search-results/search-results.component.html +++ b/frontend/src/app/components/search-form/search-results/search-results.component.html @@ -23,7 +23,7 @@ - +
{{ networkName }} Address
- -
{{ networkName }} Addresses
- -
- -
Mining Pools
- -
Lightning Nodes
- @@ -62,25 +62,19 @@
Lightning Channels
-
- -
Other Network Address
- -
- -
{{ networkName }} Address
- -
Liquid Asset