Skip to content

Commit

Permalink
feat: read chainId from connectedWallet to launch v4 projects
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnyd-eth committed Nov 26, 2024
1 parent a1c08d3 commit 2c17d4c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/hooks/Wallet/useWallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
Original file line number Diff line number Diff line change
@@ -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'
Expand All @@ -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'
Expand Down Expand Up @@ -80,8 +81,8 @@ export const ReviewDeployPage = () => {
goToPage?.('projectDetails')
dispatch(editingV2ProjectActions.resetState())
}, [dispatch, goToPage, router])

const onFinish = useCallback(async () => {

if (chainUnsupported) {
await changeNetworks()
return
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import { LaunchTxOpts, useLaunchProjectTx } from 'packages/v4/hooks/useLaunchProjectTx'
import { useCallback } from 'react'
import {
useAppSelector,
useEditingV2V3FundAccessConstraintsSelector,
useEditingV2V3FundingCycleDataSelector,
useEditingV2V3FundingCycleMetadataSelector,
} from 'redux/hooks/useAppSelector'

import { useCallback } from 'react'

/**
* Hook that returns a function that deploys a v4 project.
*
Expand Down Expand Up @@ -35,6 +36,7 @@ export const useDeployStandardProject = () => {
metadataCid: string
} & LaunchTxOpts) => {
const groupedSplits = [payoutGroupedSplits, reservedTokensGroupedSplits]

return await launchProjectTx(
{
owner: inputProjectOwner?.length ? inputProjectOwner : undefined,
Expand Down
1 change: 0 additions & 1 deletion src/packages/v4/hooks/useLaunchProjectTx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ export function useLaunchProjectTx() {
// functionName: 'launchProjectFor',
// args,
// })

const hash = await writeLaunchProject({
chainId,
address: controllerAddress,
Expand Down

0 comments on commit 2c17d4c

Please sign in to comment.