diff --git a/lib/regexp.ts b/lib/regexp.ts
index a213d8f1fd..a8be3869a8 100644
--- a/lib/regexp.ts
+++ b/lib/regexp.ts
@@ -1,3 +1,5 @@
export const URL_PREFIX = /^https?:\/\//i;
export const IPFS_PREFIX = /^ipfs:\/\//i;
+
+export const HEX_REGEXP = /^(?:0x)?[\da-fA-F]+$/;
diff --git a/ui/tx/details/TxRevertReason.tsx b/ui/tx/details/TxRevertReason.tsx
index 3c57314241..bec52e7dac 100644
--- a/ui/tx/details/TxRevertReason.tsx
+++ b/ui/tx/details/TxRevertReason.tsx
@@ -1,9 +1,10 @@
-import { Grid, GridItem, useColorModeValue } from '@chakra-ui/react';
+import { Grid, GridItem, Text, useColorModeValue } from '@chakra-ui/react';
import React from 'react';
import type { TransactionRevertReason } from 'types/api/transaction';
import hexToUtf8 from 'lib/hexToUtf8';
+import { HEX_REGEXP } from 'lib/regexp';
import LogDecodedInputData from 'ui/shared/logs/LogDecodedInputData';
type Props = TransactionRevertReason;
@@ -12,7 +13,12 @@ const TxRevertReason = (props: Props) => {
const bgColor = useColorModeValue('blackAlpha.50', 'whiteAlpha.50');
if ('raw' in props) {
+ if (!HEX_REGEXP.test(props.raw)) {
+ return { props.raw };
+ }
+
const decoded = hexToUtf8(props.raw);
+
return (