@@ -11,17 +11,19 @@ import {
1111 Platform ,
1212} from 'react-native' ;
1313import { useNavigation } from '@react-navigation/native' ;
14+ import { NativeStackNavigationProp } from '@react-navigation/native-stack' ;
1415import { colors , spacing , typography , borderRadius , shadows } from '../utils/constants' ;
1516import { Button } from '../components/common/Button' ;
1617import { Card } from '../components/common/Card' ;
1718import { useAppKit , useAppKitAccount , useAppKitProvider } from '@reown/appkit-ethers-react-native' ;
1819import walletServiceManager , { WalletConnection , TokenBalance } from '../services/walletService' ;
1920import { useWalletStore } from '../store' ;
21+ import { RootStackParamList } from '../navigation/types' ;
2022
2123import * as Clipboard from 'expo-clipboard' ;
2224
2325const WalletConnectScreen : React . FC = ( ) => {
24- const navigation = useNavigation ( ) ;
26+ const navigation = useNavigation < NativeStackNavigationProp < RootStackParamList > > ( ) ;
2527 const { open } = useAppKit ( ) ;
2628 const { address, isConnected, chainId } = useAppKitAccount ( ) ;
2729 const { walletProvider } = useAppKitProvider ( ) ;
@@ -136,7 +138,7 @@ const WalletConnectScreen: React.FC = () => {
136138
137139 const handleSetupCryptoPayments = ( ) => {
138140 if ( connection ) {
139- navigation . navigate ( 'CryptoPayment' as never ) ;
141+ navigation . navigate ( 'CryptoPayment' ) ;
140142 } else {
141143 Alert . alert ( 'Error' , 'Please connect a wallet first' ) ;
142144 }
0 commit comments