mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
address fixes
This commit is contained in:
+2
-1
@@ -1,3 +1,4 @@
|
||||
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';
|
||||
|
||||
import hexToAddress from 'lib/hexToAddress';
|
||||
import hexToUtf8 from 'lib/hexToUtf8';
|
||||
import Address from 'ui/shared/address/Address';
|
||||
import AddressLink from 'ui/shared/address/AddressLink';
|
||||
import CopyToClipboard from 'ui/shared/CopyToClipboard';
|
||||
import HashStringShortenDynamic from 'ui/shared/HashStringShortenDynamic';
|
||||
@@ -49,7 +50,10 @@ const TxLogTopic = ({ hex, index }: Props) => {
|
||||
|
||||
case 'address': {
|
||||
return (
|
||||
<AddressLink hash={ hexToAddress(hex) }/>
|
||||
<Address>
|
||||
<AddressLink hash={ value }/>
|
||||
<CopyToClipboard text={ value }/>
|
||||
</Address>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user