From 202330fb10c4bedf0b1ac5c00ca6ad6a912afc50 Mon Sep 17 00:00:00 2001 From: tom Date: Tue, 10 Dec 2024 15:21:20 +0100 Subject: [PATCH] fix error text styles --- ui/contractVerification/ContractVerificationForm.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ui/contractVerification/ContractVerificationForm.tsx b/ui/contractVerification/ContractVerificationForm.tsx index 9ea31fd7d5..bc20ce0961 100644 --- a/ui/contractVerification/ContractVerificationForm.tsx +++ b/ui/contractVerification/ContractVerificationForm.tsx @@ -107,7 +107,8 @@ const ContractVerificationForm = ({ method: methodFromQuery, config, hash }: Pro existingErrors.forEach(([ field, error ]) => setError(field, error)); } else { const globalErrors = Object.entries(payload.errors).map(([ , value ]) => value.join(', ')); - setError('root', { message: capitalizeFirstLetter(globalErrors.join('\n\n')) }); + const rootError = capitalizeFirstLetter(globalErrors.join('\n\n')); + setError('root', { message: rootError }); } await delay(100); // have to wait a little bit, otherwise isSubmitting status will not be updated @@ -210,7 +211,7 @@ const ContractVerificationForm = ({ method: methodFromQuery, config, hash }: Pro { content } - { formState.errors.root?.message && { formState.errors.root.message } } + { formState.errors.root?.message && { formState.errors.root.message } } { Boolean(method) && method.value !== 'solidity-hardhat' && method.value !== 'solidity-foundry' && (