Bugfix: do not try to decode method selector on contract creation txs fix #96
This commit is contained in:
parent
22da8082d8
commit
719ce4bd35
|
@ -76,7 +76,7 @@ const TransactionItem: React.FC<TransactionItemProps> = ({
|
||||||
<TransactionLink txHash={tx.hash} />
|
<TransactionLink txHash={tx.hash} />
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<MethodName data={tx.data} />
|
{tx.to !== null ? <MethodName data={tx.data} /> : <span></span>}
|
||||||
<span>
|
<span>
|
||||||
<BlockLink blockTag={tx.blockNumber} />
|
<BlockLink blockTag={tx.blockNumber} />
|
||||||
</span>
|
</span>
|
||||||
|
|
|
@ -72,7 +72,7 @@ const Details: React.FC<DetailsProps> = ({
|
||||||
}
|
}
|
||||||
}, [txData]);
|
}, [txData]);
|
||||||
|
|
||||||
const fourBytes = rawInputTo4Bytes(txData.data);
|
const fourBytes = txData.to !== null ? rawInputTo4Bytes(txData.data) : "0x";
|
||||||
const fourBytesEntry = use4Bytes(fourBytes);
|
const fourBytesEntry = use4Bytes(fourBytes);
|
||||||
const fourBytesTxDesc = useMemo(() => {
|
const fourBytesTxDesc = useMemo(() => {
|
||||||
if (!txData || !fourBytesEntry?.signature) {
|
if (!txData || !fourBytesEntry?.signature) {
|
||||||
|
@ -202,9 +202,11 @@ const Details: React.FC<DetailsProps> = ({
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</InfoRow>
|
</InfoRow>
|
||||||
|
{txData.to && (
|
||||||
<InfoRow title="Transaction Action">
|
<InfoRow title="Transaction Action">
|
||||||
<MethodName data={txData.data} />
|
<MethodName data={txData.data} />
|
||||||
</InfoRow>
|
</InfoRow>
|
||||||
|
)}
|
||||||
{txData.tokenTransfers.length > 0 && (
|
{txData.tokenTransfers.length > 0 && (
|
||||||
<InfoRow title={`Tokens Transferred (${txData.tokenTransfers.length})`}>
|
<InfoRow title={`Tokens Transferred (${txData.tokenTransfers.length})`}>
|
||||||
<div>
|
<div>
|
||||||
|
|
Loading…
Reference in New Issue