Skip to content

Commit 5f582f4

Browse files
Merge pull request #106 from walnuthq/fix/UI-Bug-in-error-alert
Fixed error alert
2 parents d92c714 + e9e86e6 commit 5f582f4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/components/ui/error-alert.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,14 @@ import { ContractCallSignature } from './signature';
55
import { FnName } from './function-name';
66

77
const ErrorAlert = ({ callError }: { callError: ContractCall | FunctionCall | undefined }) => {
8-
const errorDescription = callError?.errorMessage;
8+
const errorDescription = callError?.errorMessage?.replaceAll('\u0000', '');
99
return (
1010
<Alert variant="compact" className="w-fit my-2 border-red-600 dark:text-white">
1111
<ExclamationTriangleIcon className="h-5 w-5 !text-red-600" color="red" />
1212
<AlertTitle className="!font-light">Error message: </AlertTitle>
1313
<AlertDescription>
14-
<span className="text-red-600">{errorDescription}</span> in{' '}
14+
<span className="text-red-600">{errorDescription}</span>
15+
{' '}in{' '}
1516
{callError && 'classHash' in callError ? (
1617
<ContractCallSignature contractCall={callError} />
1718
) : (

0 commit comments

Comments
 (0)