Skip to content

Commit

Permalink
Only use new Smart Wallet features in development mode
Browse files Browse the repository at this point in the history
  • Loading branch information
haydenshively committed May 31, 2024
1 parent 7a789ea commit f181a0c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 4 additions & 2 deletions shared/src/components/WagmiConfig.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import { coinbaseWallet, injected, safe, walletConnect } from 'wagmi/connectors'

import { ALL_CHAINS } from '../data/constants/ChainSpecific';
import { Transport } from 'viem';
import { DEFAULT_CHAIN } from '../data/constants/Values';
import { isDevelopment } from '../util/Utils';

const transports: { [chainId: number]: Transport[] } = Object.fromEntries(ALL_CHAINS.map((c) => [c.id, []]));

Expand Down Expand Up @@ -60,8 +62,8 @@ export const wagmiConfig = createConfig({
coinbaseWallet({
appName: metadata.name,
// appLogoUrl: // TODO: do better than favicon
// appChainIds: [mainnet.id, optimism.id, arbitrum.id, base.id],
preference: 'all',
chainId: DEFAULT_CHAIN.id,
preference: isDevelopment() ? 'all' : 'eoaOnly',
}),
safe(),
],
Expand Down
3 changes: 2 additions & 1 deletion shared/src/components/navbar/NavBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import { OutlinedGradientRoundedButton } from '../common/Buttons';
import { GNFormat } from '../../data/GoodNumber';
import { useLeaderboardValue } from '../../hooks/UseLeaderboard';
import { BlueCreateWalletButton } from './CreateWalletButton';
import { isDevelopment } from '../../util/Utils';

const DesktopLogo = styled(AloeDesktopLogo)`
width: 100px;
Expand Down Expand Up @@ -319,7 +320,7 @@ export function NavBar(props: NavBarProps) {
)}
{!account.isConnected ? (
<>
<BlueCreateWalletButton shouldShortenText={shouldShortedWalletButtonsText} />
{isDevelopment() && <BlueCreateWalletButton shouldShortenText={shouldShortedWalletButtonsText} />}
<ConnectWalletButton
shouldShortenText={shouldShortedWalletButtonsText}
checkboxes={checkboxes}
Expand Down

0 comments on commit f181a0c

Please sign in to comment.