diff --git a/apps/dashboard/src/@/components/contract-components/contract-deploy-form/custom-contract.tsx b/apps/dashboard/src/@/components/contract-components/contract-deploy-form/custom-contract.tsx index d2327140858..c2b8d7af0d6 100644 --- a/apps/dashboard/src/@/components/contract-components/contract-deploy-form/custom-contract.tsx +++ b/apps/dashboard/src/@/components/contract-components/contract-deploy-form/custom-contract.tsx @@ -1,9 +1,6 @@ "use client"; -import { Flex, FormControl } from "@chakra-ui/react"; import { useMutation, useQuery } from "@tanstack/react-query"; import { verifyContract } from "app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/sources/ContractSourcesPage"; -import { FormHelperText, FormLabel } from "chakra/form"; -import { Text } from "chakra/text"; import { ArrowUpFromLineIcon, CircleAlertIcon, @@ -27,6 +24,7 @@ import { reportContractDeployed, reportContractDeployFailed, } from "@/analytics/report"; +import { FormFieldSetup } from "@/components/blocks/FormFieldSetup"; import { NetworkSelectorButton } from "@/components/misc/NetworkSelectorButton"; import { SolidityInput } from "@/components/solidity-inputs"; import { @@ -932,14 +930,17 @@ export const CustomContractForm: React.FC = ({
{/* Chain */} - - Chain - -

- Select a network to deploy this contract on. We recommend - starting with a testnet -

- + + Select a network to deploy this contract on. We recommend + starting with a testnet + + } + >
= ({ : metadata?.networksForDeployment?.networksEnabled } /> -
-
+ {metadata?.deployType === "standard" && ( <> {/* Deterministic deploy */} -
= ({ {/* Optional Salt Input */} {isCreate2Deployment && ( - - - - - Optional Salt Input - (saltForCreate2) - - - string - + + Optional Salt Input + + (saltForCreate2) + + + } + errorMessage={ + form.getFieldState("saltForCreate2", form.formState) + .error?.message + } + > = ({ Include deployer wallet address in salt (recommended) - + )} )} diff --git a/apps/dashboard/src/@/components/contract-components/contract-deploy-form/modular-contract-default-modules-fieldset.tsx b/apps/dashboard/src/@/components/contract-components/contract-deploy-form/modular-contract-default-modules-fieldset.tsx index 001190074a8..2ded81f78e2 100644 --- a/apps/dashboard/src/@/components/contract-components/contract-deploy-form/modular-contract-default-modules-fieldset.tsx +++ b/apps/dashboard/src/@/components/contract-components/contract-deploy-form/modular-contract-default-modules-fieldset.tsx @@ -1,8 +1,7 @@ -import { FormControl } from "@chakra-ui/react"; -import { FormErrorMessage, FormLabel } from "chakra/form"; import { useMemo } from "react"; import type { ThirdwebClient } from "thirdweb"; import type { FetchDeployMetadataResult } from "thirdweb/contract"; +import { FormFieldSetup } from "@/components/blocks/FormFieldSetup"; import { SolidityInput } from "@/components/solidity-inputs"; import type { CustomContractDeploymentForm } from "./custom-contract"; import { PrimarySaleFieldset } from "./primary-sale-fieldset"; @@ -104,14 +103,15 @@ function RenderModule(props: { `moduleData.${module.name}.${param.name}` as const; return ( - - {param.name} - - { - form.getFieldState(formFieldKey, form.formState).error - ?.message - } - - + ); })}
diff --git a/apps/dashboard/src/@/components/solidity-inputs/button.tsx b/apps/dashboard/src/@/components/solidity-inputs/button.tsx index 13d169d4bc7..890cdef900d 100644 --- a/apps/dashboard/src/@/components/solidity-inputs/button.tsx +++ b/apps/dashboard/src/@/components/solidity-inputs/button.tsx @@ -1,9 +1,9 @@ import type { UseMutationResult } from "@tanstack/react-query"; -import { Button, type ButtonProps } from "chakra/button"; import { UploadIcon } from "lucide-react"; import { toast } from "sonner"; import type { ThirdwebClient } from "thirdweb"; import { FileInput } from "@/components/blocks/FileInput"; +import { Button, type ButtonProps } from "@/components/ui/button"; import { useErrorHandler } from "@/contexts/error-handler"; import type { ComponentWithChildren } from "@/types/component-with-children"; @@ -39,12 +39,13 @@ export const IpfsUploadButton: ComponentWithChildren = ({ diff --git a/apps/dashboard/src/chakra/button.tsx b/apps/dashboard/src/chakra/button.tsx index 1ed8d9955ad..242ec153afb 100644 --- a/apps/dashboard/src/chakra/button.tsx +++ b/apps/dashboard/src/chakra/button.tsx @@ -30,7 +30,7 @@ const buttonSizesMap = { type PossibleButtonSize = keyof typeof buttonSizesMap; -export interface ButtonProps extends Omit { +interface ButtonProps extends Omit { size?: PossibleButtonSize; fromcolor?: string; tocolor?: string;