File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ export const SwapComponent: FC<SwapProps> = ({
39
39
if ( theme ) {
40
40
setTheme ( theme ) ;
41
41
}
42
+ console . log ( tonConnectInstance ) ;
42
43
if ( tonConnectInstance ) {
43
44
setTonConnectInstance ( tonConnectInstance ) ;
44
45
}
@@ -52,14 +53,16 @@ export const SwapComponent: FC<SwapProps> = ({
52
53
disconnect,
53
54
} = useWalletStore ( ) ;
54
55
useEffect ( ( ) => {
55
- // tonConnectInstance.onStatusChange((wallet) => {
56
- // if (wallet) {
57
- // setWallet(wallet);
58
- // } else if (stateWallet && !wallet) {
59
- // disconnect();
60
- // }
61
- // });
56
+ console . log ( tonConnectInstance ) ;
57
+ tonConnectInstance . onStatusChange ( ( wallet ) => {
58
+ if ( wallet ) {
59
+ console . log ( wallet ) ;
60
+ } else if ( stateWallet && ! wallet ) {
61
+ disconnect ( ) ;
62
+ }
63
+ } ) ;
62
64
if ( tonConnectInstance . wallet ) {
65
+ console . log ( tonConnectInstance . wallet ) ;
63
66
setWallet ( tonConnectInstance . wallet ) ;
64
67
} else if ( stateWallet && ! tonConnectInstance . wallet ) {
65
68
disconnect ( ) ;
You can’t perform that action at this time.
0 commit comments