Rename environment variable for wallet connect project id
This commit is contained in:
parent
8ca5a1d8a9
commit
503bc29218
2
react-native-config.d.ts
vendored
2
react-native-config.d.ts
vendored
@ -1,6 +1,6 @@
|
||||
declare module 'react-native-config' {
|
||||
export interface NativeConfig {
|
||||
PROJECT_ID: string;
|
||||
WALLET_CONNECT_PROJECT_ID: string;
|
||||
}
|
||||
|
||||
export const Config: NativeConfig;
|
||||
|
||||
@ -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({
|
||||
|
||||
Loading…
Reference in New Issue
Block a user