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} />
|
||||
</span>
|
||||
</div>
|
||||
<MethodName data={tx.data} />
|
||||
{tx.to !== null ? <MethodName data={tx.data} /> : <span></span>}
|
||||
<span>
|
||||
<BlockLink blockTag={tx.blockNumber} />
|
||||
</span>
|
||||
|
|
|
@ -72,7 +72,7 @@ const Details: React.FC<DetailsProps> = ({
|
|||
}
|
||||
}, [txData]);
|
||||
|
||||
const fourBytes = rawInputTo4Bytes(txData.data);
|
||||
const fourBytes = txData.to !== null ? rawInputTo4Bytes(txData.data) : "0x";
|
||||
const fourBytesEntry = use4Bytes(fourBytes);
|
||||
const fourBytesTxDesc = useMemo(() => {
|
||||
if (!txData || !fourBytesEntry?.signature) {
|
||||
|
@ -202,9 +202,11 @@ const Details: React.FC<DetailsProps> = ({
|
|||
</div>
|
||||
)}
|
||||
</InfoRow>
|
||||
<InfoRow title="Transaction Action">
|
||||
<MethodName data={txData.data} />
|
||||
</InfoRow>
|
||||
{txData.to && (
|
||||
<InfoRow title="Transaction Action">
|
||||
<MethodName data={txData.data} />
|
||||
</InfoRow>
|
||||
)}
|
||||
{txData.tokenTransfers.length > 0 && (
|
||||
<InfoRow title={`Tokens Transferred (${txData.tokenTransfers.length})`}>
|
||||
<div>
|
||||
|
|
Loading…
Reference in New Issue