diff --git a/.env b/.env index e3b0a04..8e5c08d 100644 --- a/.env +++ b/.env @@ -2,5 +2,4 @@ VITE_BASE_URL=https://v4.testnet.dydx.exchange VITE_ALCHEMY_API_KEY=FP275q327Yh7qswtZWenbPXdZZdnAFmC -VITE_WALLETCONNECT1_BRIDGE=wss://api.dydx.exchange/wc/ VITE_WALLETCONNECT2_PROJECT_ID=fbe94eaa691fa8d929561f8567062b32 diff --git a/.env.example b/.env.example index 84ce9c6..3a0d1b2 100644 --- a/.env.example +++ b/.env.example @@ -4,7 +4,6 @@ VITE_ALCHEMY_API_KEY= VITE_PK_ENCRYPTION_KEY= -VITE_WALLETCONNECT1_BRIDGE= VITE_WALLETCONNECT2_PROJECT_ID= VITE_V3_TOKEN_ADDRESS= \ No newline at end of file diff --git a/src/lib/wagmi.ts b/src/lib/wagmi.ts index fabaaa2..c78c476 100644 --- a/src/lib/wagmi.ts +++ b/src/lib/wagmi.ts @@ -87,14 +87,6 @@ const injectedConnectorOptions = { }, }; -const walletconnect1ConnectorOptions = { - chains, - options: { - bridge: import.meta.env.VITE_WALLETCONNECT1_BRIDGE, - qrcode: true, - }, -}; - const walletconnect2ConnectorOptions: ConstructorParameters[0] = { chains, options: { @@ -143,7 +135,6 @@ const connectors = [ reloadOnDisconnect: false, }, }), - new WalletConnectLegacyConnector(walletconnect1ConnectorOptions), new WalletConnectConnector(walletconnect2ConnectorOptions), new InjectedConnector(injectedConnectorOptions), ]; @@ -166,19 +157,6 @@ const createInjectedConnectorWithProvider = (provider: ExternalProvider) => provider as unknown as Awaited>; })(injectedConnectorOptions) as InjectedConnector; -// Create a custom wagmi WalletConnectLegacyConnector with a modal showing only wallet links matching the given name -const createWalletConnect1ConnectorWithName = (walletconnect1Name: string) => - new WalletConnectLegacyConnector({ - ...walletconnect1ConnectorOptions, - options: { - ...walletconnect1ConnectorOptions.options, - qrcodeModalOptions: { - desktopLinks: [walletconnect1Name], - mobileLinks: [walletconnect1Name], - }, - }, - }); - const createWalletConnect2ConnectorWithId = (walletconnect2Id: string) => new WalletConnectConnector({ ...walletconnect2ConnectorOptions, @@ -214,9 +192,6 @@ export const resolveWagmiConnector = ({ return walletConnection.type === WalletConnectionType.InjectedEip1193 && walletConnection.provider ? createInjectedConnectorWithProvider(walletConnection.provider) - : walletConnection.type === WalletConnectionType.WalletConnect1 && - walletConfig.walletconnect1Name - ? createWalletConnect1ConnectorWithName(walletConfig.walletconnect1Name) : walletConnection.type === WalletConnectionType.WalletConnect2 && walletConfig.walletconnect2Id ? createWalletConnect2ConnectorWithId(walletConfig.walletconnect2Id) : connectors.find(({ id }: { id: string }) => id === walletConnectionConfig.wagmiConnectorId); diff --git a/src/lib/wallet/index.ts b/src/lib/wallet/index.ts index c8619d2..80ee1c4 100644 --- a/src/lib/wallet/index.ts +++ b/src/lib/wallet/index.ts @@ -45,12 +45,6 @@ export const getWalletConnection = ({ break; } - case WalletConnectionType.WalletConnect1: { - return { - type: WalletConnectionType.WalletConnect1, - }; - } - case WalletConnectionType.WalletConnect2: { return { type: WalletConnectionType.WalletConnect2,