|
|
|
@ -46,14 +46,29 @@ const searchEngine = (query, record) => { |
|
|
|
|
if (record && ( |
|
|
|
|
(record.name && record.name.toLowerCase().includes(query.toLowerCase())) || |
|
|
|
|
(record.symbol && record.symbol.toLowerCase().includes(query.toLowerCase())) || |
|
|
|
|
(record.contract_address_hash && record.contract_address_hash.toLowerCase().includes(query.toLowerCase())) |
|
|
|
|
(record.contract_address_hash && record.contract_address_hash.toLowerCase().includes(query.toLowerCase())) || |
|
|
|
|
(record.transaction_hash && record.transaction_hash.toLowerCase().includes(query.toLowerCase())) || |
|
|
|
|
(record.address_hash && record.address_hash.toLowerCase().includes(query.toLowerCase())) || |
|
|
|
|
(record.block_hash && record.block_hash.toLowerCase().includes(query.toLowerCase())) |
|
|
|
|
) |
|
|
|
|
) { |
|
|
|
|
var searchResult = `${record.contract_address_hash}<br/>` |
|
|
|
|
var searchResult = '' |
|
|
|
|
if (record.type === 'transaction') { |
|
|
|
|
searchResult += `${record.transaction_hash}<br/>` |
|
|
|
|
} else if (record.type === 'address') { |
|
|
|
|
searchResult += `${record.address_hash}<br/>` |
|
|
|
|
} else if (record.type === 'block') { |
|
|
|
|
searchResult += `${record.block_hash}<br/>` |
|
|
|
|
} else { |
|
|
|
|
searchResult += `${record.contract_address_hash}<br/>` |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (record.type === 'label') { |
|
|
|
|
searchResult += `<div class="fontawesome-icon tag"></div><span> <b>${record.name}</b></span>` |
|
|
|
|
} else { |
|
|
|
|
searchResult += `<b>${record.name}</b>` |
|
|
|
|
if (record.name) { |
|
|
|
|
searchResult += `<b>${record.name}</b>` |
|
|
|
|
} |
|
|
|
|
if (record.symbol) { |
|
|
|
|
searchResult += ` (${record.symbol})` |
|
|
|
|
} |
|
|
|
|