hashgraph / hedera-mirror-node-explorer

Hedera Mirror Node Explorer for the Hedera Hashgraph DLT.
Apache License 2.0
14 stars 9 forks source link

00972 Use names resolved by Search Bar to label account ids #1035

Closed ericleponner closed 1 month ago

ericleponner commented 2 months ago

Description:

Changes below implement request #972. When users searches for a domain name in Search Bar, search result is saved in browser local storage and used by Explorer to decorate its pages.

1) Account Details page displays the resolved name in Domain field (below the EVM Address):

image

2) Explorer then displays resolved name in every places where entity id is normally displayed (eg Transfer Graphs, Contract Result section, …)

image

Names saved in browser local storage are periodically checked:

Related issue(s):

Fixes #972

Notes for reviewer:

Sample domain names (on mainnet): example.hbar, kabuto.hbar, kabuto.hh, karate.hbar

Checklist

github-actions[bot] commented 2 months ago

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 82.87% 39052 / 47119
🔵 Statements 82.87% 39052 / 47119
🔵 Functions 62.68% 882 / 1407
🔵 Branches 84.01% 4085 / 4862
File Coverage
File Stmts % Branch % Funcs % Lines Uncovered Lines
Changed Files
src/AppStorage.ts 74.92% 72.41% 50% 74.92% 52-53, 56-57, 71-72, 99-101, 104-106, 119-120, 134-135, 148-149, 162-163, 172-184, 187-189, 192-193, 220-221, 234-238, 246-251, 254-256, 274-275, 288-289, 298-307, 310-324
src/components/values/link/AccountIOL.vue 100% 100% 100% 100%
src/components/values/link/ContractIOL.vue 100% 100% 100% 100%
src/components/values/link/EntityIOL.vue 96.63% 44.44% 100% 96.63% 98-99, 101-102
src/pages/AccountDetails.vue 46.51% 81.91% 14.28% 46.51% 1-282, 400-406, 410-412, 450-451, 456-457, 474-476
src/pages/ContractDetails.vue 100% 93.9% 100% 100%
src/utils/SearchRequest.ts 91.46% 80% 100% 91.46% 124-130, 142-143, 164-167, 196-198, 204-205, 225-226, 308-311, 348-349, 352-354, 359-360
src/utils/cache/CacheUtils.ts 100% 100% 100% 100%
src/utils/cache/HNSCache.ts 93.54% 100% 50% 93.54% 29-30
src/utils/cache/KNSCache.ts 93.54% 100% 50% 93.54% 29-30
src/utils/name_service/NameQuery.ts 67.18% 80% 71.42% 67.18% 67, 84-106, 109-126
Generated in workflow #921
sonarcloud[bot] commented 2 months ago

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarCloud

ericleponner commented 1 month ago

This PR is replaced by #1081. Closing.