File tree Expand file tree Collapse file tree 1 file changed +5
-10
lines changed
packages/appkit/src/views/w3m-connecting-view Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ export function ConnectingView() {
3838 }
3939 } ;
4040
41- const initializeConnection = async ( retry = false , retryTimestamp ?: number ) => {
41+ const initializeConnection = async ( retry = false ) => {
4242 try {
4343 const { wcPairingExpiry } = WcController . state ;
4444 const { data : routeData } = RouterController . state ;
@@ -73,11 +73,9 @@ export function ConnectingView() {
7373 }
7474 } ) ;
7575
76- const currentRetryTime = retryTimestamp ?? lastRetryRef . current ;
77- if ( isQr && CoreHelperUtil . isAllowedRetry ( currentRetryTime ) ) {
78- const newRetryTime = Date . now ( ) ;
79- lastRetryRef . current = newRetryTime ;
80- initializeConnection ( true , newRetryTime ) ;
76+ if ( isQr && CoreHelperUtil . isAllowedRetry ( lastRetryRef . current ) ) {
77+ lastRetryRef . current = Date . now ( ) ;
78+ initializeConnection ( true ) ;
8179 }
8280 }
8381 } ;
@@ -107,10 +105,7 @@ export function ConnectingView() {
107105 } , [ data , isInstalled ] ) ;
108106
109107 useEffect ( ( ) => {
110- // Clear any stale URI from previous connection attempts
111- WcController . clearUri ( ) ;
112-
113- initializeConnection ( ) ;
108+ initializeConnection ( true ) ;
114109 let _interval : NodeJS . Timeout ;
115110
116111 // Check if the pairing expired every 10 seconds. If expired, it will create a new uri.
You can’t perform that action at this time.
0 commit comments