Skip to content

Commit a2dd045

Browse files
chore: show rejection alert in case the user rejects the connection
1 parent 048885f commit a2dd045

File tree

1 file changed

+7
-11
lines changed
  • packages/appkit/src/views/w3m-connecting-view

1 file changed

+7
-11
lines changed

packages/appkit/src/views/w3m-connecting-view/index.tsx

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)