diff --git a/.env b/.env index 4f718e6..c039d12 100644 --- a/.env +++ b/.env @@ -1 +1 @@ -PROJECT_ID= +WALLET_CONNECT_PROJECT_ID= diff --git a/react-native-config.d.ts b/react-native-config.d.ts index 08f8a35..8267e47 100644 --- a/react-native-config.d.ts +++ b/react-native-config.d.ts @@ -1,6 +1,6 @@ declare module 'react-native-config' { export interface NativeConfig { - PROJECT_ID: string; + WALLET_CONNECT_PROJECT_ID: string; } export const Config: NativeConfig; diff --git a/utils/wallet-connect/WalletConnectUtils.tsx b/utils/wallet-connect/WalletConnectUtils.tsx index 7fc0fa3..cac6b49 100644 --- a/utils/wallet-connect/WalletConnectUtils.tsx +++ b/utils/wallet-connect/WalletConnectUtils.tsx @@ -1,6 +1,7 @@ import '@walletconnect/react-native-compat'; import '@ethersproject/shims'; +import { useState, useCallback, useEffect } from 'react'; import Config from 'react-native-config'; import { Core } from '@walletconnect/core'; @@ -10,11 +11,9 @@ import { Web3Wallet, IWeb3Wallet } from '@walletconnect/web3wallet'; export let web3wallet: IWeb3Wallet; export let core: ICore; -import { useState, useCallback, useEffect } from 'react'; - export async function createWeb3Wallet() { const core = new Core({ - projectId: Config.PROJECT_ID, + projectId: Config.WALLET_CONNECT_PROJECT_ID, }); web3wallet = await Web3Wallet.init({