Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/common/utils/wallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ const defaultChains: Chain[] = isProd
? [mainnet, polygon]
: [goerli, polygonMumbai]

// 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,
[alchemyProvider({ apiKey: alchemyId })]
Expand Down
7 changes: 5 additions & 2 deletions src/components/Forms/WalletAuthForm/Select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -236,7 +236,10 @@ const Select: React.FC<FormProps> = ({
analytics.trackEvent('click_button', {
type: 'connectorWalletConnect',
})
connect({ connector: walletConnectConnector })
connect({
connector: walletConnectConnector,
chainId: walletConnectConnectChain.id,
})
}}
role="button"
right={isWalletConnectLoading ? <IconSpinner16 color="grey" /> : null}
Expand Down