Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(evm): disable binance and wallet-connect on localhost #366

Merged
merged 1 commit into from
Dec 19, 2024
Merged
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
39 changes: 24 additions & 15 deletions apps/evm/src/lib/wagmi/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ const prodChains = [bob, mainnet];
const allChains = [...testnetChains, ...prodChains];

const getConfig = ({ isProd, multiInjectedProviderDiscovery }: Config) => {
const isDev = process.env.NODE_ENV === 'development';

const coinbase = coinbaseWallet({
appName: 'BOB',
appLogoUrl: 'https://uploads-ssl.webflow.com/64e85c2f3609488b3ed725f4/64ecae53ef4b561482f1c49f_bob1.jpg'
});

const connectors = [
...(typeof window !== 'undefined' && window.ethereum !== undefined
? [
Expand All @@ -24,21 +31,23 @@ const getConfig = ({ isProd, multiInjectedProviderDiscovery }: Config) => {
})
]
: []),
walletConnect({
showQrModal: true,
projectId: 'd9a2f927549acc3da9e4893729772641',
metadata: {
name: 'BOB',
description: 'BOB is a hybrid L2 that combines the security of Bitcoin with the versatility of Ethereum',
url: 'https://www.app.gobob.xyz',
icons: ['https://uploads-ssl.webflow.com/64e85c2f3609488b3ed725f4/64ecae53ef4b561482f1c49f_bob1.jpg']
}
}),
coinbaseWallet({
appName: 'BOB',
appLogoUrl: 'https://uploads-ssl.webflow.com/64e85c2f3609488b3ed725f4/64ecae53ef4b561482f1c49f_bob1.jpg'
}),
binanceConnector()

...(isDev
? [coinbase]
: [
walletConnect({
showQrModal: true,
projectId: 'd9a2f927549acc3da9e4893729772641',
metadata: {
name: 'BOB',
description: 'BOB is a hybrid L2 that combines the security of Bitcoin with the versatility of Ethereum',
url: 'https://www.app.gobob.xyz',
icons: ['https://uploads-ssl.webflow.com/64e85c2f3609488b3ed725f4/64ecae53ef4b561482f1c49f_bob1.jpg']
}
}),
coinbase,
binanceConnector()
])
];

return createConfig({
Expand Down
Loading