From cd26970d7f3960ebdbe96994f277c2c4f656e3a8 Mon Sep 17 00:00:00 2001 From: Danny Skubak Date: Fri, 15 Jun 2018 16:48:19 -0400 Subject: [PATCH] [Fix] Make ENS Value Consistent (#1956) * add hex prefix to labelHash * update formatting, display highest bid as ether * remove unused var --- .../ENS/components/NameResolve/components/NameOwned.tsx | 7 ++++--- common/sagas/ens/modeMap.ts | 2 +- common/translations/lang/en.json | 1 + 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/common/containers/Tabs/ENS/components/NameResolve/components/NameOwned.tsx b/common/containers/Tabs/ENS/components/NameResolve/components/NameOwned.tsx index e59eb0ae..628a8a71 100644 --- a/common/containers/Tabs/ENS/components/NameResolve/components/NameOwned.tsx +++ b/common/containers/Tabs/ENS/components/NameResolve/components/NameOwned.tsx @@ -1,5 +1,6 @@ import React from 'react'; import { IOwnedDomainRequest } from 'libs/ens'; +import { fromWei, Wei } from 'libs/units'; import { NewTabLink, Address } from 'components/ui'; import translate from 'translations'; const lookupLink = (name: string) => `https://etherscan.io/enslookup?q=${name}`; @@ -34,7 +35,7 @@ export const NameOwned: React.SFC = ({ {labelHash} - {translate('NAME_OWNED_NAMEHASH', { name })} + {translate('NAME_OWNED_NAMEHASH', { name })}: {nameHash} @@ -44,9 +45,9 @@ export const NameOwned: React.SFC = ({ - {translate('NAME_OWNED_HIGHEST_BIDDER')} + {translate('NAME_OWNED_HIGHEST_BID')}: - {highestBid} + {fromWei(Wei(highestBid), 'ether')} ETH diff --git a/common/sagas/ens/modeMap.ts b/common/sagas/ens/modeMap.ts index 11da910b..d7e0f940 100644 --- a/common/sagas/ens/modeMap.ts +++ b/common/sagas/ens/modeMap.ts @@ -87,7 +87,7 @@ export function* resolveDomainRequest(name: string): SagaIterator { name, ...domainData, ...result, - labelHash: hash.toString('hex'), + labelHash: ethUtil.addHexPrefix(hash.toString('hex')), nameHash }; return returnValue; diff --git a/common/translations/lang/en.json b/common/translations/lang/en.json index 4aa6020d..a371fde7 100644 --- a/common/translations/lang/en.json +++ b/common/translations/lang/en.json @@ -591,6 +591,7 @@ "NAME_OWNED_NAMEHASH": "Namehash $name.eth", "NAME_OWNED_OWNER": "Owner", "NAME_OWNED_HIGHEST_BIDDER": "Highest Bidder", + "NAME_OWNED_HIGHEST_BID": "Highest Bid", "NAME_OWNED_RESOLVED_ADDR": "Resolved Address", "LINK": "[$name]($link)", "RECENT_TX_NETWORK_EXPLORER": "an explorer for the $network_name network",