hashgraph / hedera-mirror-node-explorer

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

feat: use names resolved by Search Bar to label account ids #1081

Closed ericleponner closed 1 month ago

ericleponner commented 1 month ago

Description:

Changes below implement request #972. When user 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 and Contract Details pages display the domain name in Domain field and the provider name in a tooltip

image

2) other pages replace the account id by its matching domain name

image

3) when Explorer gets a response from multiple name services, it displays a dialog which enables user to choose which name resolution to use.

image

Related issue(s):

Fixes #972

Notes for reviewer:

Samples names to test on mainnet:

Checklist

github-actions[bot] commented 1 month ago

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 82.75% 39499 / 47728
🔵 Statements 82.75% 39499 / 47728
🔵 Functions 62.98% 895 / 1421
🔵 Branches 84.01% 4116 / 4899
File Coverage
File Stmts % Branch % Funcs % Lines Uncovered Lines
Changed Files
src/AppStorage.ts 75.22% 72.41% 50% 75.22% 53-54, 57-58, 72-73, 100-102, 105-107, 120-121, 135-136, 149-150, 163-164, 173-185, 188-190, 193-194, 221-222, 234-235, 248-249, 258-267, 270-284, 297-301, 309-312, 315-317
src/components/NameCollisionDialog.vue 76.33% 100% 0% 76.33% 92-122
src/components/SearchBar.vue 53.75% 50% 14.28% 53.75% 28-40, 47, 59-60, 104-105, 107-120, 123-199, 202, 212
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.92% 81.91% 14.28% 46.92% 1-285, 405-411, 415-417, 455-456, 461-462, 479-481
src/pages/ContractDetails.vue 100% 93.9% 100% 100%
src/utils/SearchRequest.ts 87.23% 79.72% 92.3% 87.23% 124-130, 142-143, 164-167, 196-198, 204-205, 225-226, 308-311, 343-346, 348-355, 360-361, 366-375
src/utils/name_service/NameQuery.ts 71.07% 80% 83.33% 71.07% 58-66, 78, 95-119
src/utils/name_service/NameService.ts 97.93% 94.11% 100% 97.93% 55-56
src/utils/name_service/provider/HNSProvider.ts 89.15% 44.44% 100% 89.15% 46-48, 63-64, 66-67, 78-79
src/utils/name_service/provider/KNSProvider.ts 90.9% 44.44% 100% 90.9% 46, 51-52, 55-56, 73-74
Generated in workflow #949
sonarcloud[bot] commented 1 month ago

Quality Gate Failed Quality Gate failed

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

See analysis details on SonarCloud