[Fix] Make ENS Value Consistent (#1956)

* add hex prefix to labelHash

* update formatting, display highest bid as ether

* remove unused var
This commit is contained in:
Danny Skubak 2018-06-15 16:48:19 -04:00 committed by Daniel Ternyak
parent 88ba6b7d23
commit cd26970d7f
3 changed files with 6 additions and 4 deletions

View File

@ -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<IOwnedDomainRequest> = ({
<MonoTd>{labelHash}</MonoTd>
</tr>
<tr>
<td>{translate('NAME_OWNED_NAMEHASH', { name })} </td>
<td>{translate('NAME_OWNED_NAMEHASH', { name })}: </td>
<MonoTd>{nameHash}</MonoTd>
</tr>
<tr>
@ -44,9 +45,9 @@ export const NameOwned: React.SFC<IOwnedDomainRequest> = ({
</MonoTd>
</tr>
<tr>
<td>{translate('NAME_OWNED_HIGHEST_BIDDER')}</td>
<td>{translate('NAME_OWNED_HIGHEST_BID')}:</td>
<MonoTd>
<span>{highestBid}</span>
<span>{fromWei(Wei(highestBid), 'ether')} ETH</span>
</MonoTd>
</tr>
<tr>

View File

@ -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;

View File

@ -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",