Fix wrong message when cant decode input
This commit is contained in:
parent
bace76e12c
commit
70649af097
|
@ -75,7 +75,10 @@ const Details: React.FC<DetailsProps> = ({
|
||||||
const fourBytes = txData.to !== null ? rawInputTo4Bytes(txData.data) : "0x";
|
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 (!fourBytesEntry) {
|
||||||
|
return fourBytesEntry;
|
||||||
|
}
|
||||||
|
if (!txData || !fourBytesEntry.signature) {
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
const sig = fourBytesEntry?.signature;
|
const sig = fourBytesEntry?.signature;
|
||||||
|
@ -355,7 +358,7 @@ const Details: React.FC<DetailsProps> = ({
|
||||||
) : resolvedTxDesc === undefined ? (
|
) : resolvedTxDesc === undefined ? (
|
||||||
<>Waiting for data...</>
|
<>Waiting for data...</>
|
||||||
) : resolvedTxDesc === null ? (
|
) : resolvedTxDesc === null ? (
|
||||||
<>No decoded data</>
|
<>Can't decode data</>
|
||||||
) : (
|
) : (
|
||||||
<DecodedParamsTable
|
<DecodedParamsTable
|
||||||
args={resolvedTxDesc.args}
|
args={resolvedTxDesc.args}
|
||||||
|
|
Loading…
Reference in New Issue