You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
./node_modules/@web3-react/walletconnect-v2/node_modules/@walletconnect/ethereum-provider/dist/index.es.js 64:14
Module parse failed: Unexpected token (64:14)
File was processed with these loaders:
* ./node_modules/babel-loader/lib/index.js
You may need an additional loader to handle the result of these loaders.
| rpcMap: M
| },
> l = e?.filter(g => !u.includes(g)),
| d = i?.filter(g => !p.includes(g));
| if (!s && !c && !n && !(l != null && l.length) && !(d != null && d.length)) return {
this error is showing up when i am trying to import the v2
`import { InjectedConnector } from '@web3-react/injected-connector'
import { WalletConnect, WalletConnect as WalletConnectV2} from '@web3-react/walletconnect-v2'
import { initializeConnector } from '@web3-react/core'
import { CHAINS, MAINNET_CHAINS } from './chains'
import { WalletConnectConnector } from '@web3-react/walletconnect-connector'
export const injected = new InjectedConnector({ supportedChainIds: [56, 32520] })
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
error
this error is showing up when i am trying to import the v2
`import { InjectedConnector } from '@web3-react/injected-connector'
import { WalletConnect, WalletConnect as WalletConnectV2} from '@web3-react/walletconnect-v2'
import { initializeConnector } from '@web3-react/core'
import { CHAINS, MAINNET_CHAINS } from './chains'
import { WalletConnectConnector } from '@web3-react/walletconnect-connector'
export const injected = new InjectedConnector({ supportedChainIds: [56, 32520] })
// const RPC_URL = 'https://bsc-dataseed1.binance.org';
// export const walletConnect = new WalletConnectConnector({
// // rpcUrl:
https://mainnet.infura.io/v3/${process.env.INFURA_KEY}
,// bridge: "https://bridge.walletconnect.org",
// qrcode: true,
// });
// const [mainnet, ...optionalChains] = Object.keys(MAINNET_CHAINS).map(Number)
// const [walletConnectV2, hooks] = initializeConnector(
// actions =>
// new WalletConnectV2({
// actions,
// options: {
// projectId: '1126e68f62f37f9c67b144f4b6648ad1',
// rpcMap:[54],
// showQrModal: true
// }
// })
// )
// export const walletConnect = walletConnectV2;
const chains = [137, 42220]
export const [walletConnect, hooks] = initializeConnector(
(actions) =>
new WalletConnectV2({
actions,
options: {
projectId: process.env.NEXT_PUBLIC_WALLET_CONNECT_ID,
chains,
showQrModal: true,
},
})
);
`
i have added te code i am using
Beta Was this translation helpful? Give feedback.
All reactions