diff --git a/.env.dev b/.env.dev index b920482236..5393f72d22 100644 --- a/.env.dev +++ b/.env.dev @@ -22,6 +22,6 @@ NEXT_PUBLIC_PROGRAMMABLE_SEARCH_ENGINE_ID=004538121411474993797:xkl3sdy-9su NEXT_PUBLIC_TRAVELOGGERS_URL=https://nft-develop.matters.news NEXT_PUBLIC_LOGBOOKS_URL=https://logbooks-vercel.matters.news NEXT_PUBLIC_ALCHEMY_KEY=1dMo8xjAFo8M6Y4sQ45WTD3Zie2-MA4C -NEXT_PUBLIC_USDT_CONTRACT_ADDRESS=0xfe4F5145f6e09952a5ba9e956ED0C25e3Fa4c7F1 +NEXT_PUBLIC_USDT_CONTRACT_ADDRESS=0xc2132D05D31c914a87C6611C10748AEb04B58e8F NEXT_PUBLIC_CURATION_CONTRACT_ADDRESS=0xa219c6722008aa22828b31a13ab9ba93bb91222c DEBUG=false diff --git a/src/common/utils/wallet.ts b/src/common/utils/wallet.ts index 6d186d1b6b..280b5a3867 100644 --- a/src/common/utils/wallet.ts +++ b/src/common/utils/wallet.ts @@ -1,5 +1,5 @@ import { Chain, configureChains, createClient, createStorage } from 'wagmi' -import { goerli, mainnet, polygon, polygonMumbai } from 'wagmi/chains' +import { goerli, mainnet, polygon } from 'wagmi/chains' import { MetaMaskConnector } from 'wagmi/connectors/metaMask' import { WalletConnectConnector } from 'wagmi/connectors/walletConnect' import { alchemyProvider } from 'wagmi/providers/alchemy' @@ -10,13 +10,16 @@ const isProd = process.env.NEXT_PUBLIC_RUNTIME_ENV === 'production' const alchemyId = process.env.NEXT_PUBLIC_ALCHEMY_KEY! export const featureSupportedChains = { - curation: isProd ? [polygon] : [polygonMumbai], + curation: isProd ? [polygon] : [polygon], ens: isProd ? [mainnet] : [goerli], } -const defaultChains: Chain[] = isProd - ? [mainnet, polygon] - : [goerli, polygonMumbai] +const defaultChains: Chain[] = isProd ? [mainnet, polygon] : [goerli, polygon] + +// FIXME: make contract wallet (e.g. UniPass) default chain as +// Polygon Mainnet for signing since most of the wallet providers help user +// to deplopy contract on Polygon Mainnet free of charge. +export const walletConnectConnectChain = polygon export const { provider: wagmiProvider, chains } = configureChains( defaultChains, diff --git a/src/components/Forms/WalletAuthForm/Select.tsx b/src/components/Forms/WalletAuthForm/Select.tsx index ad6fea6d26..07283425a9 100644 --- a/src/components/Forms/WalletAuthForm/Select.tsx +++ b/src/components/Forms/WalletAuthForm/Select.tsx @@ -3,7 +3,7 @@ import { FormattedMessage } from 'react-intl' import { useAccount, useConnect, useDisconnect } from 'wagmi' import { EXTERNAL_LINKS, GUIDE_LINKS } from '~/common/enums' -import { analytics } from '~/common/utils' +import { analytics, walletConnectConnectChain } from '~/common/utils' import { Dialog, Form, @@ -236,7 +236,10 @@ const Select: React.FC = ({ analytics.trackEvent('click_button', { type: 'connectorWalletConnect', }) - connect({ connector: walletConnectConnector }) + connect({ + connector: walletConnectConnector, + chainId: walletConnectConnectChain.id, + }) }} role="button" right={isWalletConnectLoading ? : null}