diff --git a/app/components/VerificationForm.tsx b/app/components/VerificationForm.tsx index 9d4cdf0..6338c97 100644 --- a/app/components/VerificationForm.tsx +++ b/app/components/VerificationForm.tsx @@ -28,9 +28,10 @@ import { IoSettings } from "react-icons/io5"; interface VerificationFormProps { preselectedChainId?: string; preselectedAddress?: string; + hideImport?: boolean; } -export default function VerificationForm({ preselectedChainId, preselectedAddress }: VerificationFormProps) { +export default function VerificationForm({ preselectedChainId, preselectedAddress, hideImport }: VerificationFormProps) { const { serverUrl } = useServerConfig(); const { chains } = useChains(); const { solidityVersions, vyperVersions } = useCompilerVersions(); @@ -330,17 +331,18 @@ export default function VerificationForm({ preselectedChainId, preselectedAddres preselectedAddress={preselectedAddress} /> - + {!hideImport && ( + )} @@ -369,8 +371,8 @@ export default function VerificationForm({ preselectedChainId, preselectedAddres selectedMethod === "metadata-json" ? handleMetadataFileChange : selectedMethod === "build-info" - ? handleBuildInfoFileChange - : handleFilesChange + ? handleBuildInfoFileChange + : handleFilesChange } uploadedFiles={ selectedMethod === "metadata-json" ? (metadataFile ? [metadataFile] : []) : uploadedFiles @@ -383,7 +385,7 @@ export default function VerificationForm({ preselectedChainId, preselectedAddres {}} + onValidationChange={() => { }} /> {/* Render an additional file upload for the sources when the method is metadata-json. We can treat the sources' file upload as a multiple-files case. */} @@ -446,11 +448,10 @@ export default function VerificationForm({ preselectedChainId, preselectedAddres - -
- - -
- - ) : ( -
-
- - {etherscanApiKey ? ( - showEtherscanApiKey ? ( - etherscanApiKey + {!hideImportSettings && ( +
+

API Keys

+
+
+ +
+ {isEditingApiKey ? ( +
+
+ + -
-
- - {etherscanApiKey && ( + + )} + +
+
+ - )} +
-
- )} - {etherscanApiKeyError &&

{etherscanApiKeyError}

} + ) : ( +
+
+ + {etherscanApiKey ? ( + showEtherscanApiKey ? ( + etherscanApiKey + ) : ( + maskApiKey(etherscanApiKey) + ) + ) : ( + No API key set + )} + + +
+
+ + {etherscanApiKey && ( + + )} +
+
+ )} + {etherscanApiKeyError &&

{etherscanApiKeyError}

} +
-
+ )} diff --git a/app/routes/widget.tsx b/app/routes/widget.tsx index 978c9e7..39c89a4 100644 --- a/app/routes/widget.tsx +++ b/app/routes/widget.tsx @@ -49,7 +49,7 @@ export default function Widget() {
- +