Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support verification of Stylus contracts #2450

Merged
merged 10 commits into from
Dec 11, 2024
Prev Previous commit
fix error text styles
tom2drum committed Dec 10, 2024
commit 202330fb10c4bedf0b1ac5c00ca6ad6a912afc50
5 changes: 3 additions & 2 deletions ui/contractVerification/ContractVerificationForm.tsx
Original file line number Diff line number Diff line change
@@ -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
<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"