import React, { useCallback, useState } from 'react'; import { View } from 'react-native'; import { Button, Text, TextInput } from 'react-native-paper'; import { useNavigation } from '@react-navigation/native'; import { NativeStackNavigationProp } from '@react-navigation/native-stack'; import { web3WalletPair } from '../utils/wallet-connect/WalletConnectUtils'; import styles from '../styles/stylesheet'; import { StackParamsList } from '../types'; import { useWalletConnect } from '../context/WalletConnectContext'; const AddSession = () => { const navigation = useNavigation>(); const [currentWCURI, setCurrentWCURI] = useState(''); const {web3wallet} = useWalletConnect(); const pair = useCallback(async () => { if (!web3wallet) { return; } const pairing = await web3WalletPair(web3wallet, { uri: currentWCURI }); navigation.navigate('WalletConnect'); return pairing; }, [currentWCURI, navigation, web3wallet]); return ( Enter WalletConnect URI ); }; export default AddSession;