diff --git a/src/hooks/Wallet/useWallet.ts b/src/hooks/Wallet/useWallet.ts index 3d01614a7e..e97d72250a 100644 --- a/src/hooks/Wallet/useWallet.ts +++ b/src/hooks/Wallet/useWallet.ts @@ -15,7 +15,7 @@ export function useWallet() { const userAddress = useUserAddress() const isConnected = useIsConnected() const chain = useChain() - const chainUnsupported = false//useChainUnsupported() + const chainUnsupported = false //useChainUnsupported() const balance = useWalletBalance() const [, connect] = useConnectWallet() diff --git a/src/packages/v4/components/Create/components/pages/ReviewDeploy/ReviewDeployPage.tsx b/src/packages/v4/components/Create/components/pages/ReviewDeploy/ReviewDeployPage.tsx index 7302f3591b..2fc63d316b 100644 --- a/src/packages/v4/components/Create/components/pages/ReviewDeploy/ReviewDeployPage.tsx +++ b/src/packages/v4/components/Create/components/pages/ReviewDeploy/ReviewDeployPage.tsx @@ -1,6 +1,8 @@ +import { Checkbox, Form } from 'antd' +import { useCallback, useContext, useEffect, useMemo, useState } from 'react' + import { CheckCircleFilled } from '@ant-design/icons' import { Trans } from '@lingui/macro' -import { Checkbox, Form } from 'antd' import { Callout } from 'components/Callout/Callout' import ExternalLink from 'components/ExternalLink' import TransactionModal from 'components/modals/TransactionModal' @@ -10,7 +12,6 @@ import { emitConfirmationDeletionModal } from 'hooks/emitConfirmationDeletionMod import useMobile from 'hooks/useMobile' import { useModal } from 'hooks/useModal' import { useRouter } from 'next/router' -import { useCallback, useContext, useEffect, useMemo, useState } from 'react' import { useDispatch } from 'react-redux' import { useAppSelector } from 'redux/hooks/useAppSelector' import { useSetCreateFurthestPageReached } from 'redux/hooks/useEditingCreateFurthestPageReached' @@ -80,8 +81,8 @@ export const ReviewDeployPage = () => { goToPage?.('projectDetails') dispatch(editingV2ProjectActions.resetState()) }, [dispatch, goToPage, router]) - const onFinish = useCallback(async () => { + if (chainUnsupported) { await changeNetworks() return diff --git a/src/packages/v4/components/Create/hooks/DeployProject/hooks/useDeployStandardProject.ts b/src/packages/v4/components/Create/hooks/DeployProject/hooks/useDeployStandardProject.ts index 2ec6c7a771..a110af0b1e 100644 --- a/src/packages/v4/components/Create/hooks/DeployProject/hooks/useDeployStandardProject.ts +++ b/src/packages/v4/components/Create/hooks/DeployProject/hooks/useDeployStandardProject.ts @@ -1,5 +1,4 @@ import { LaunchTxOpts, useLaunchProjectTx } from 'packages/v4/hooks/useLaunchProjectTx' -import { useCallback } from 'react' import { useAppSelector, useEditingV2V3FundAccessConstraintsSelector, @@ -7,6 +6,8 @@ import { useEditingV2V3FundingCycleMetadataSelector, } from 'redux/hooks/useAppSelector' +import { useCallback } from 'react' + /** * Hook that returns a function that deploys a v4 project. * @@ -35,6 +36,7 @@ export const useDeployStandardProject = () => { metadataCid: string } & LaunchTxOpts) => { const groupedSplits = [payoutGroupedSplits, reservedTokensGroupedSplits] + return await launchProjectTx( { owner: inputProjectOwner?.length ? inputProjectOwner : undefined, diff --git a/src/packages/v4/hooks/useLaunchProjectTx.ts b/src/packages/v4/hooks/useLaunchProjectTx.ts index e2817e6740..df905ddffd 100644 --- a/src/packages/v4/hooks/useLaunchProjectTx.ts +++ b/src/packages/v4/hooks/useLaunchProjectTx.ts @@ -135,7 +135,6 @@ export function useLaunchProjectTx() { // functionName: 'launchProjectFor', // args, // }) - const hash = await writeLaunchProject({ chainId, address: controllerAddress,