Commit ca1a7da6 authored by tom's avatar tom

address fixes

parent 5e8a8a6d
export default function hexToAddress(hex: string) { export default function hexToAddress(hex: string) {
return hex.slice(0, 2) + hex.slice(26); const shortenHex = hex.slice(0, 66);
return shortenHex.slice(0, 2) + shortenHex.slice(26);
} }
...@@ -4,6 +4,7 @@ import React from 'react'; ...@@ -4,6 +4,7 @@ import React from 'react';
import hexToAddress from 'lib/hexToAddress'; import hexToAddress from 'lib/hexToAddress';
import hexToUtf8 from 'lib/hexToUtf8'; import hexToUtf8 from 'lib/hexToUtf8';
import Address from 'ui/shared/address/Address';
import AddressLink from 'ui/shared/address/AddressLink'; import AddressLink from 'ui/shared/address/AddressLink';
import CopyToClipboard from 'ui/shared/CopyToClipboard'; import CopyToClipboard from 'ui/shared/CopyToClipboard';
import HashStringShortenDynamic from 'ui/shared/HashStringShortenDynamic'; import HashStringShortenDynamic from 'ui/shared/HashStringShortenDynamic';
...@@ -49,7 +50,10 @@ const TxLogTopic = ({ hex, index }: Props) => { ...@@ -49,7 +50,10 @@ const TxLogTopic = ({ hex, index }: Props) => {
case 'address': { case 'address': {
return ( return (
<AddressLink hash={ hexToAddress(hex) }/> <Address>
<AddressLink hash={ value }/>
<CopyToClipboard text={ value }/>
</Address>
); );
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment