Skip to content

Commit

Permalink
fix error text styles
Browse files Browse the repository at this point in the history
  • Loading branch information
tom2drum committed Dec 10, 2024
1 parent 1dcccac commit 202330f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ui/contractVerification/ContractVerificationForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -210,7 +211,7 @@ const ContractVerificationForm = ({ method: methodFromQuery, config, hash }: Pro
<ContractVerificationFieldMethod methods={ config.verification_options }/>
</Grid>
{ content }
{ formState.errors.root?.message && <Text color="error"mt={ 4 } fontSize="sm">{ formState.errors.root.message }</Text> }
{ formState.errors.root?.message && <Text color="error"mt={ 4 } fontSize="sm" whiteSpace="pre-wrap">{ formState.errors.root.message }</Text> }
{ Boolean(method) && method.value !== 'solidity-hardhat' && method.value !== 'solidity-foundry' && (
<Button
variant="solid"
Expand Down

0 comments on commit 202330f

Please sign in to comment.