@@ -32,7 +32,6 @@ export function ConnectingView() {
3232 const onRetry = ( ) => {
3333 if ( CoreHelperUtil . isAllowedRetry ( lastRetry ) ) {
3434 setLastRetry ( Date . now ( ) ) ;
35- WcController . clearUri ( ) ;
3635 initializeConnection ( true ) ;
3736 } else {
3837 SnackController . showError ( 'Please wait a second before retrying' ) ;
@@ -46,6 +45,7 @@ export function ConnectingView() {
4645 const isPairingExpired = CoreHelperUtil . isPairingExpired ( wcPairingExpiry ) ;
4746 if ( retry || isPairingExpired ) {
4847 WcController . setWcError ( false ) ;
48+ WcController . clearUri ( ) ;
4949
5050 const connectPromise = connect ( {
5151 wallet : routeData ?. wallet
@@ -56,17 +56,6 @@ export function ConnectingView() {
5656 } catch ( error ) {
5757 LogController . sendError ( error , 'ConnectingView.tsx' , 'initializeConnection' ) ;
5858 WcController . setWcError ( true ) ;
59- WcController . clearUri ( ) ;
60-
61- const currentRetryTime = retryTimestamp ?? lastRetry ;
62-
63- if ( isQr && CoreHelperUtil . isAllowedRetry ( currentRetryTime ) ) {
64- const newRetryTime = Date . now ( ) ;
65- setLastRetry ( newRetryTime ) ;
66- initializeConnection ( true , newRetryTime ) ;
67-
68- return ;
69- }
7059
7160 const isUserRejected = ErrorUtil . isUserRejectedRequestError ( error ) ;
7261 const isProposalExpired = ErrorUtil . isProposalExpiredError ( error ) ;
@@ -83,6 +72,13 @@ export function ConnectingView() {
8372 message : ( error as Error ) ?. message ?? 'Unknown'
8473 }
8574 } ) ;
75+
76+ const currentRetryTime = retryTimestamp ?? lastRetry ;
77+ if ( isQr && CoreHelperUtil . isAllowedRetry ( currentRetryTime ) ) {
78+ const newRetryTime = Date . now ( ) ;
79+ setLastRetry ( newRetryTime ) ;
80+ initializeConnection ( true , newRetryTime ) ;
81+ }
8682 }
8783 } ;
8884
0 commit comments