diff --git a/package.json b/package.json index a39af736a8..ffb3fdea64 100644 --- a/package.json +++ b/package.json @@ -106,8 +106,8 @@ "graphql": "^16.8.1", "he": "^1.2.0", "jsonwebtoken": "^9.0.0", - "juice-sdk-core": "^11.5.0-alpha", - "juice-sdk-react": "^11.6.0-alpha", + "juice-sdk-core": "^11.6.0-alpha", + "juice-sdk-react": "^11.7.1-alpha", "juicebox-metadata-helper": "0.1.7", "less": "4.1.2", "lodash": "^4.17.21", diff --git a/src/components/NftRewards/AddNftCollectionForm/AddNftCollectionForm.tsx b/src/components/NftRewards/AddNftCollectionForm/AddNftCollectionForm.tsx index fdd41bf0d0..f31acc9273 100644 --- a/src/components/NftRewards/AddNftCollectionForm/AddNftCollectionForm.tsx +++ b/src/components/NftRewards/AddNftCollectionForm/AddNftCollectionForm.tsx @@ -34,6 +34,7 @@ export const AddNftCollectionForm = ({ nftRewardsData, okButton, onFinish, + priceCurrencySymbol, }: { form: FormInstance initialValues?: NftRewardsFormProps @@ -41,6 +42,7 @@ export const AddNftCollectionForm = ({ nftRewardsData: NftRewardsData okButton: React.ReactNode onFinish?: VoidFunction + priceCurrencySymbol: string }) => { const lockPageRulesWrapper = useLockPageRulesWrapper() @@ -59,7 +61,11 @@ export const AddNftCollectionForm = ({ >
- + {hasNfts && ( diff --git a/src/components/NftRewards/RewardsList/AddEditRewardModal.tsx b/src/components/NftRewards/RewardsList/AddEditRewardModal.tsx index eb45425d6c..c2eb1c4b8f 100644 --- a/src/components/NftRewards/RewardsList/AddEditRewardModal.tsx +++ b/src/components/NftRewards/RewardsList/AddEditRewardModal.tsx @@ -1,5 +1,5 @@ import { QuestionCircleOutlined } from '@ant-design/icons' -import { t, Trans } from '@lingui/macro' +import { Trans, t } from '@lingui/macro' import { Form, Modal, Tooltip } from 'antd' import InputAccessoryButton from 'components/buttons/InputAccessoryButton' import { WarningCallout } from 'components/Callout/WarningCallout' @@ -17,7 +17,6 @@ import { NftRewardTier } from 'models/nftRewards' import { CreateCollapse } from 'packages/v2v3/components/Create/components/CreateCollapse/CreateCollapse' import { OptionalHeader } from 'packages/v2v3/components/Create/components/OptionalHeader' import { DEFAULT_NFT_MAX_SUPPLY } from 'packages/v2v3/constants/nftRewards' -import { V2V3_CURRENCY_USD } from 'packages/v2v3/utils/currency' import { UploadRequestOption } from 'rc-upload/lib/interface' import { useCallback, useEffect, useLayoutEffect, useState } from 'react' import { NftRewardsData } from 'redux/slices/shared/v2ProjectTypes' @@ -56,6 +55,7 @@ export const NEW_NFT_ID_LOWER_LIMIT = 1000000 export const AddEditRewardModal = ({ className, + currencySymbol, editingData, nftRewards, open, @@ -64,6 +64,7 @@ export const AddEditRewardModal = ({ withEditWarning = false, }: { className?: string + currencySymbol: string editingData?: NftRewardTier | undefined nftRewards: NftRewardsData open?: boolean @@ -245,11 +246,7 @@ export const AddEditRewardModal = ({ rules={[inputMustExistRule({ label: t`Minimum Contribution` })]} > - } + accessory={} /> diff --git a/src/components/NftRewards/RewardsList/RewardItem.tsx b/src/components/NftRewards/RewardsList/RewardItem.tsx index 0e5a64be6c..17e32c31b2 100644 --- a/src/components/NftRewards/RewardsList/RewardItem.tsx +++ b/src/components/NftRewards/RewardsList/RewardItem.tsx @@ -6,7 +6,6 @@ import { JuiceVideoThumbnailOrImage } from 'components/JuiceVideo/JuiceVideoThum import TooltipLabel from 'components/TooltipLabel' import round from 'lodash/round' import { NftRewardTier } from 'models/nftRewards' -import { V2V3_CURRENCY_USD } from 'packages/v2v3/utils/currency' import { ReactNode } from 'react' import { NftRewardsData } from 'redux/slices/shared/v2ProjectTypes' import { isZeroAddress } from 'utils/address' @@ -29,11 +28,13 @@ function numberUpToPrecisionFormat( export const RewardItem = ({ reward, nftRewards, + priceCurrencySymbol, onEditClicked, onDeleteClicked, }: { reward: NftRewardTier nftRewards: NftRewardsData + priceCurrencySymbol: string onEditClicked?: () => void onDeleteClicked?: () => void }) => { @@ -97,9 +98,9 @@ export const RewardItem = ({
{hasLimitedSupply(maxSupply) && ( >({ rewards: [], @@ -34,6 +34,7 @@ type RewardsListProps = FormItemInput & { allowCreate?: boolean withEditWarning?: boolean nftRewardsData: NftRewardsData + priceCurrencySymbol: string } interface RewardsListChildrenExports { @@ -44,6 +45,7 @@ interface RewardsListChildrenExports { export const RewardsList: React.FC> & RewardsListChildrenExports = ({ allowCreate = false, + priceCurrencySymbol, value, onChange, withEditWarning, @@ -82,6 +84,7 @@ export const RewardsList: React.FC> &
{ setSelectedReward(reward) @@ -112,6 +115,7 @@ export const RewardsList: React.FC> & )}
{ if (!connectedChain) { diff --git a/src/packages/v2v3/components/Create/components/pages/NftRewards/NftRewardsPage.tsx b/src/packages/v2v3/components/Create/components/pages/NftRewards/NftRewardsPage.tsx index 40aaf02b0b..ca917a589b 100644 --- a/src/packages/v2v3/components/Create/components/pages/NftRewards/NftRewardsPage.tsx +++ b/src/packages/v2v3/components/Create/components/pages/NftRewards/NftRewardsPage.tsx @@ -1,11 +1,12 @@ import { AddNftCollectionForm } from 'components/NftRewards/AddNftCollectionForm/AddNftCollectionForm' import { CREATE_FLOW } from 'constants/fathomEvents' import { trackFathomGoal } from 'lib/fathom' +import { V2V3_CURRENCY_USD } from 'packages/v2v3/utils/currency' import { useContext } from 'react' import { useAppSelector } from 'redux/hooks/useAppSelector' import { useSetCreateFurthestPageReached } from 'redux/hooks/useEditingCreateFurthestPageReached' -import { Wizard } from '../../Wizard/Wizard' import { PageContext } from '../../Wizard/contexts/PageContext' +import { Wizard } from '../../Wizard/Wizard' import { useCreateFlowNftRewardsForm } from './hooks/useCreateFlowNftRewardsForm' export function NftRewardsPage() { @@ -22,9 +23,12 @@ export function NftRewardsPage() { useSetCreateFurthestPageReached('nftRewards') + const nftCurrency = nftRewardsData?.pricing.currency + return ( { return formatEnabled(nftRewardsData.flags.preventOverspending) }, [nftRewardsData.flags.preventOverspending]) + const nftCurrency = nftRewardsData?.pricing.currency + return (
state.creatingV2Project.nftRewards, ) + const nftCurrency = nftRewardsData?.pricing.currency + return ( <> @@ -68,6 +72,7 @@ export function EditNftsSection() {
} + priceCurrencySymbol={NATIVE_TOKEN_SYMBOLS[chainId as JBChainId]} onFinish={() => { goToNextPage?.() trackFathomGoal(CREATE_FLOW.NFT_NEXT_CTA) diff --git a/src/packages/v4/components/Create/components/pages/ReviewDeploy/components/RewardsReview/RewardsReview.tsx b/src/packages/v4/components/Create/components/pages/ReviewDeploy/components/RewardsReview/RewardsReview.tsx index fbfa22b23a..3d9b8604ac 100644 --- a/src/packages/v4/components/Create/components/pages/ReviewDeploy/components/RewardsReview/RewardsReview.tsx +++ b/src/packages/v4/components/Create/components/pages/ReviewDeploy/components/RewardsReview/RewardsReview.tsx @@ -1,5 +1,6 @@ import { t } from '@lingui/macro' import { RewardsList } from 'components/NftRewards/RewardsList/RewardsList' +import { JBChainId, NATIVE_TOKEN_SYMBOLS } from 'juice-sdk-core' import { NftRewardTier } from 'models/nftRewards' import { useCallback, useMemo } from 'react' import { useAppDispatch } from 'redux/hooks/useAppDispatch' @@ -7,6 +8,7 @@ import { useAppSelector } from 'redux/hooks/useAppSelector' import { creatingV2ProjectActions } from 'redux/slices/creatingV2Project' import { formatEnabled } from 'utils/format/formatBoolean' import { v4 } from 'uuid' +import { useChainId } from 'wagmi' import { ReviewDescription } from '../ReviewDescription' export const RewardsReview = () => { @@ -65,9 +67,12 @@ export const RewardsReview = () => { return formatEnabled(nftRewardsData.flags.preventOverspending) }, [nftRewardsData.flags.preventOverspending]) + const chainId = useChainId() + return (
= ({ children, }) => { const router = useRouter() + const chainId = useCurrentRouteChainId() - const { projectId: rawProjectId, chainName } = router.query + const { projectId: rawProjectId } = router.query if (!rawProjectId) return null const projectId = parseInt(rawProjectId as string) const projectIdBigInt = BigInt(projectId) - const chainId = chainNameMap[chainName as string] return ( @@ -38,9 +38,7 @@ export const V4SettingsProvider: React.FC = ({ - - {children} - + {children} diff --git a/src/packages/v4/hooks/JB721Delegate/transactor/useLaunchProjectWithNftsTx.ts b/src/packages/v4/hooks/JB721Delegate/transactor/useLaunchProjectWithNftsTx.ts index 9fd869a9a0..9558d5bbc6 100644 --- a/src/packages/v4/hooks/JB721Delegate/transactor/useLaunchProjectWithNftsTx.ts +++ b/src/packages/v4/hooks/JB721Delegate/transactor/useLaunchProjectWithNftsTx.ts @@ -1,18 +1,35 @@ +import { waitForTransactionReceipt } from '@wagmi/core' +import { JUICEBOX_MONEY_PROJECT_METADATA_DOMAIN } from 'constants/metadataDomain' +import { TxHistoryContext } from 'contexts/Transaction/TxHistoryContext' +import { useWallet } from 'hooks/Wallet' import { DEFAULT_MEMO, NATIVE_TOKEN, NATIVE_TOKEN_DECIMALS, } from 'juice-sdk-core' import { + JBChainId, jbPricesAddress, useJBContractContext, - useWriteJb721TiersHookProjectDeployerLaunchProjectFor + useWriteJb721TiersHookProjectDeployerLaunchProjectFor, } from 'juice-sdk-react' +import { isValidMustStartAtOrAfter } from 'packages/v2v3/utils/fundingCycle' import { JBDeploy721TiersHookConfig, LaunchProjectWithNftsTxArgs, } from 'packages/v4/models/nfts' +import { wagmiConfig } from 'packages/v4/wagmiConfig' +import { useContext } from 'react' +import { DEFAULT_MUST_START_AT_OR_AFTER } from 'redux/slices/shared/v2ProjectDefaultState' +import { ipfsUri } from 'utils/ipfs' import { Address, WaitForTransactionReceiptReturnType, zeroAddress } from 'viem' +import { + arbitrumSepolia, + baseSepolia, + optimismSepolia, + sepolia, +} from 'viem/chains' +import { useChainId } from 'wagmi' import { LaunchV2V3ProjectArgs, transformV2V3CreateArgsToV4, @@ -23,17 +40,6 @@ import { SUPPORTED_JB_MULTITERMINAL_ADDRESS, } from '../../useLaunchProjectTx' -import { waitForTransactionReceipt } from '@wagmi/core' -import { JUICEBOX_MONEY_PROJECT_METADATA_DOMAIN } from 'constants/metadataDomain' -import { TxHistoryContext } from 'contexts/Transaction/TxHistoryContext' -import { useWallet } from 'hooks/Wallet' -import { isValidMustStartAtOrAfter } from 'packages/v2v3/utils/fundingCycle' -import { wagmiConfig } from 'packages/v4/wagmiConfig' -import { useContext } from 'react' -import { DEFAULT_MUST_START_AT_OR_AFTER } from 'redux/slices/shared/v2ProjectDefaultState' -import { ipfsUri } from 'utils/ipfs' -import { useChainId } from 'wagmi' - /** * Return the project ID created from a `launchProjectFor` transaction. * @param txReceipt receipt of `launchProjectFor` transaction @@ -53,10 +59,10 @@ export const getProjectIdFromNftLaunchReceipt = ( * @todo not ideal to hardcode these addresses */ export const SUPPORTED_JB_721_TIER_STORE = { - '84532': '0x4DeF0AA5B9CA095d11705284221b2878731ab4EF' as Address, - '421614': '0x4DeF0AA5B9CA095d11705284221b2878731ab4EF' as Address, - '11155111': '0x4DeF0AA5B9CA095d11705284221b2878731ab4EF' as Address, - '11155420': '0x4DeF0AA5B9CA095d11705284221b2878731ab4EF' as Address, + [sepolia.id]: '0x4DeF0AA5B9CA095d11705284221b2878731ab4EF' as Address, + [optimismSepolia.id]: '0x4DeF0AA5B9CA095d11705284221b2878731ab4EF' as Address, + [arbitrumSepolia.id]: '0x4DeF0AA5B9CA095d11705284221b2878731ab4EF' as Address, + [baseSepolia.id]: '0x4DeF0AA5B9CA095d11705284221b2878731ab4EF' as Address, } export function useLaunchProjectWithNftsTx() { @@ -65,17 +71,15 @@ export function useLaunchProjectWithNftsTx() { const { userAddress } = useWallet() const chainId = useChainId() - const chainIdStr = - chainId?.toString() as keyof typeof SUPPORTED_JB_MULTITERMINAL_ADDRESS const defaultJBController = chainId - ? SUPPORTED_JB_CONTROLLER_ADDRESS[chainIdStr] + ? SUPPORTED_JB_CONTROLLER_ADDRESS[chainId as JBChainId] : undefined const defaultJBETHPaymentTerminal = chainId - ? SUPPORTED_JB_MULTITERMINAL_ADDRESS[chainIdStr] + ? SUPPORTED_JB_MULTITERMINAL_ADDRESS[chainId as JBChainId] : undefined const JBTiered721DelegateStoreAddress = chainId - ? SUPPORTED_JB_721_TIER_STORE[chainIdStr] + ? SUPPORTED_JB_721_TIER_STORE[chainId as JBChainId] : undefined const { writeContractAsync: writeLaunchProject } = @@ -146,7 +150,7 @@ export function useLaunchProjectWithNftsTx() { tiersConfig: { currency, decimals: NATIVE_TOKEN_DECIMALS, - prices: jbPricesAddress[chainIdStr], + prices: jbPricesAddress[chainId as JBChainId], tiers, }, reserveBeneficiary: zeroAddress, diff --git a/src/packages/v4/hooks/useCurrentRouteChainId.ts b/src/packages/v4/hooks/useCurrentRouteChainId.ts index d5766f5bf1..ce35621834 100644 --- a/src/packages/v4/hooks/useCurrentRouteChainId.ts +++ b/src/packages/v4/hooks/useCurrentRouteChainId.ts @@ -4,9 +4,6 @@ import { chainNameMap } from '../utils/networks' export function useCurrentRouteChainId() { const router = useRouter() const { chainName } = router.query - if (!chainName) { - return undefined - } return chainNameMap[chainName as string] } diff --git a/src/packages/v4/hooks/useLaunchProjectTx.ts b/src/packages/v4/hooks/useLaunchProjectTx.ts index ae49aa1ba6..0b360772fd 100644 --- a/src/packages/v4/hooks/useLaunchProjectTx.ts +++ b/src/packages/v4/hooks/useLaunchProjectTx.ts @@ -1,20 +1,28 @@ -import { useCallback, useContext } from 'react' -import { Address, WaitForTransactionReceiptReturnType } from 'viem' -import { - LaunchV2V3ProjectArgs, - transformV2V3CreateArgsToV4, -} from '../utils/launchProjectTransformers' - import { waitForTransactionReceipt } from '@wagmi/core' import { JUICEBOX_MONEY_PROJECT_METADATA_DOMAIN } from 'constants/metadataDomain' import { DEFAULT_MEMO } from 'constants/transactionDefaults' import { TxHistoryContext } from 'contexts/Transaction/TxHistoryContext' import { useWallet } from 'hooks/Wallet' import { NATIVE_TOKEN } from 'juice-sdk-core' -import { useWriteJbControllerLaunchProjectFor } from 'juice-sdk-react' +import { + JBChainId, + useWriteJbControllerLaunchProjectFor, +} from 'juice-sdk-react' import { LaunchV2V3ProjectData } from 'packages/v2v3/hooks/transactor/useLaunchProjectTx' +import { useCallback, useContext } from 'react' import { DEFAULT_MUST_START_AT_OR_AFTER } from 'redux/slices/shared/v2ProjectDefaultState' +import { Address, WaitForTransactionReceiptReturnType } from 'viem' +import { + arbitrumSepolia, + baseSepolia, + optimismSepolia, + sepolia, +} from 'viem/chains' import { useChainId } from 'wagmi' +import { + LaunchV2V3ProjectArgs, + transformV2V3CreateArgsToV4, +} from '../utils/launchProjectTransformers' import { wagmiConfig } from '../wagmiConfig' const CREATE_EVENT_IDX = 2 @@ -47,17 +55,17 @@ export const getProjectIdFromLaunchReceipt = ( * @todo not ideal to hardcode these addresses */ export const SUPPORTED_JB_MULTITERMINAL_ADDRESS = { - '84532': '0x4DeF0AA5B9CA095d11705284221b2878731ab4EF' as Address, - '421614': '0x4DeF0AA5B9CA095d11705284221b2878731ab4EF' as Address, - '11155111': '0x4DeF0AA5B9CA095d11705284221b2878731ab4EF' as Address, - '11155420': '0x4DeF0AA5B9CA095d11705284221b2878731ab4EF' as Address, + [sepolia.id]: '0x4DeF0AA5B9CA095d11705284221b2878731ab4EF' as Address, + [optimismSepolia.id]: '0x4DeF0AA5B9CA095d11705284221b2878731ab4EF' as Address, + [arbitrumSepolia.id]: '0x4DeF0AA5B9CA095d11705284221b2878731ab4EF' as Address, + [baseSepolia.id]: '0x4DeF0AA5B9CA095d11705284221b2878731ab4EF' as Address, } export const SUPPORTED_JB_CONTROLLER_ADDRESS = { - '84532': '0x219A5cE6d1c512D5b050ad2E3d380b8746BE0Cb8' as Address, - '421614': '0x219A5cE6d1c512D5b050ad2E3d380b8746BE0Cb8' as Address, - '11155111': '0x219A5cE6d1c512D5b050ad2E3d380b8746BE0Cb8' as Address, - '11155420': '0x219A5cE6d1c512D5b050ad2E3d380b8746BE0Cb8' as Address, + [sepolia.id]: '0x219A5cE6d1c512D5b050ad2E3d380b8746BE0Cb8' as Address, + [optimismSepolia.id]: '0x219A5cE6d1c512D5b050ad2E3d380b8746BE0Cb8' as Address, + [arbitrumSepolia.id]: '0x219A5cE6d1c512D5b050ad2E3d380b8746BE0Cb8' as Address, + [baseSepolia.id]: '0x219A5cE6d1c512D5b050ad2E3d380b8746BE0Cb8' as Address, } /** @@ -69,14 +77,13 @@ export function useLaunchProjectTx() { useWriteJbControllerLaunchProjectFor() const chainId = useChainId() - const chainIdStr = - chainId?.toString() as keyof typeof SUPPORTED_JB_MULTITERMINAL_ADDRESS + const terminalAddress = chainId - ? SUPPORTED_JB_MULTITERMINAL_ADDRESS[chainIdStr] + ? SUPPORTED_JB_MULTITERMINAL_ADDRESS[chainId as JBChainId] : undefined const controllerAddress = chainId - ? SUPPORTED_JB_CONTROLLER_ADDRESS[chainIdStr] + ? SUPPORTED_JB_CONTROLLER_ADDRESS[chainId as JBChainId] : undefined const { addTransaction } = useContext(TxHistoryContext) diff --git a/src/packages/v4/hooks/useV4ProjectRoute.ts b/src/packages/v4/hooks/useV4ProjectRoute.ts deleted file mode 100644 index 1e032acb8b..0000000000 --- a/src/packages/v4/hooks/useV4ProjectRoute.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { useChainId } from 'wagmi' -import { v4ProjectRoute } from '../utils/routes' - -export function useV4ProjectRoute(projectId: number) { - const chainId = useChainId() - - return v4ProjectRoute({ - chainId, - projectId, - }) -} diff --git a/src/packages/v4/views/V4ProjectDashboard/V4ProjectHeader.tsx b/src/packages/v4/views/V4ProjectDashboard/V4ProjectHeader.tsx index decdad49b9..ce91676e82 100644 --- a/src/packages/v4/views/V4ProjectDashboard/V4ProjectHeader.tsx +++ b/src/packages/v4/views/V4ProjectDashboard/V4ProjectHeader.tsx @@ -10,6 +10,7 @@ import { SocialLinkButton } from 'components/Project/ProjectHeader/SocialLinkBut // import { Subtitle } from 'components/Project/ProjectHeader/Subtitle' import { TruncatedText } from 'components/TruncatedText' import useMobile from 'hooks/useMobile' +import { useJBChainId } from 'juice-sdk-react' import Link from 'next/link' import { ProjectHeaderPopupMenu } from 'packages/v4/components/ProjectDashboard/components/ProjectHeaderPopupMenu' import V4ProjectHandleLink from 'packages/v4/components/V4ProjectHandleLink' @@ -17,7 +18,6 @@ import { useV4WalletHasPermission } from 'packages/v4/hooks/useV4WalletHasPermis import { V4OperatorPermission } from 'packages/v4/models/v4Permissions' import { settingsPagePath, v4ProjectRoute } from 'packages/v4/utils/routes' import { twMerge } from 'tailwind-merge' -import { useChainId } from 'wagmi' import { useV4ProjectHeader } from './hooks/useV4ProjectHeader' import { ProjectHeaderStats } from './ProjectHeaderStats' @@ -25,7 +25,7 @@ export type SocialLink = 'twitter' | 'discord' | 'telegram' | 'website' export const V4ProjectHeader = ({ className }: { className?: string }) => { const socialLinks = useSocialLinks() - const chainId = useChainId() + const chainId = useJBChainId() const { title, @@ -103,13 +103,14 @@ export const V4ProjectHeader = ({ className }: { className?: string }) => {
- {subtitle && - (subtitle.type === 'tagline' ? ( - - ) : null) + { + subtitle && + (subtitle.type === 'tagline' ? ( + + ) : null) // }
diff --git a/src/packages/v4/views/V4ProjectDashboard/V4ProjectTabs/V4TokensPanel/V4TokensPanel.tsx b/src/packages/v4/views/V4ProjectDashboard/V4ProjectTabs/V4TokensPanel/V4TokensPanel.tsx index 852df78c49..c70722c44a 100644 --- a/src/packages/v4/views/V4ProjectDashboard/V4ProjectTabs/V4TokensPanel/V4TokensPanel.tsx +++ b/src/packages/v4/views/V4ProjectDashboard/V4ProjectTabs/V4TokensPanel/V4TokensPanel.tsx @@ -11,13 +11,12 @@ import { SettingOutlined } from '@ant-design/icons' import { Button, Tooltip } from 'antd' import { AddTokenToMetamaskButton } from 'components/buttons/AddTokenToMetamaskButton' import { ISSUE_ERC20_EXPLANATION } from 'components/strings' -import { useJBContractContext } from 'juice-sdk-react' +import { useJBChainId, useJBContractContext } from 'juice-sdk-react' import { V4TokenHoldersModal } from 'packages/v4/components/modals/V4TokenHoldersModal/V4TokenHoldersModal' import { useProjectHasErc20Token } from 'packages/v4/hooks/useProjectHasErc20Token' import { v4ProjectRoute } from 'packages/v4/utils/routes' import { useCallback, useState } from 'react' import { reloadWindow } from 'utils/windowUtils' -import { useChainId } from 'wagmi' import { useV4BalanceMenuItemsUserFlags } from './hooks/useV4BalanceMenuItemsUserFlags' import { useV4TokensPanel } from './hooks/useV4TokensPanel' import { useV4YourBalanceMenuItems } from './hooks/useV4YourBalanceMenuItems' @@ -181,7 +180,7 @@ export const V4TokensPanel = () => { } const ProjectTokenCard = () => { - const chainId = useChainId() + const chainId = useJBChainId() const { projectId: projectIdBig } = useJBContractContext() const projectId = Number(projectIdBig) @@ -215,10 +214,14 @@ const ProjectTokenCard = () => { {canCreateErc20Token ? (