Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 7 additions & 11 deletions packages/appkit/src/views/w3m-connecting-view/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,6 @@ export function ConnectingView() {
} catch (error) {
LogController.sendError(error, 'ConnectingView.tsx', 'initializeConnection');
WcController.setWcError(true);
WcController.clearUri();

const currentRetryTime = retryTimestamp ?? lastRetry;

if (isQr && CoreHelperUtil.isAllowedRetry(currentRetryTime)) {
const newRetryTime = Date.now();
setLastRetry(newRetryTime);
initializeConnection(true, newRetryTime);

return;
}

const isUserRejected = ErrorUtil.isUserRejectedRequestError(error);
const isProposalExpired = ErrorUtil.isProposalExpiredError(error);
Expand All @@ -83,6 +72,13 @@ export function ConnectingView() {
message: (error as Error)?.message ?? 'Unknown'
}
});

const currentRetryTime = retryTimestamp ?? lastRetry;
if (isQr && CoreHelperUtil.isAllowedRetry(currentRetryTime)) {
const newRetryTime = Date.now();
setLastRetry(newRetryTime);
initializeConnection(true, newRetryTime);
}
}
};

Expand Down
Loading