diff --git a/examples/expo-multichain/package-lock.json b/examples/expo-multichain/package-lock.json index ef48e84f..44962b7b 100644 --- a/examples/expo-multichain/package-lock.json +++ b/examples/expo-multichain/package-lock.json @@ -11199,9 +11199,9 @@ } }, "node_modules/hono": { - "version": "4.10.2", - "resolved": "https://registry.npmjs.org/hono/-/hono-4.10.2.tgz", - "integrity": "sha512-p6fyzl+mQo6uhESLxbF5WlBOAJMDh36PljwlKtP5V1v09NxlqGru3ShK+4wKhSuhuYf8qxMmrivHOa/M7q0sMg==", + "version": "4.10.3", + "resolved": "https://registry.npmjs.org/hono/-/hono-4.10.3.tgz", + "integrity": "sha512-2LOYWUbnhdxdL8MNbNg9XZig6k+cZXm5IjHn2Aviv7honhBMOHb+jxrKIeJRZJRmn+htUCKhaicxwXuUDlchRA==", "license": "MIT", "engines": { "node": ">=16.9.0" diff --git a/examples/expo-multichain/package.json b/examples/expo-multichain/package.json index 782d35dd..51d662b6 100644 --- a/examples/expo-multichain/package.json +++ b/examples/expo-multichain/package.json @@ -76,7 +76,8 @@ "typescript": "~5.9.2" }, "overrides": { - "react": "19.1.0" + "react": "19.1.0", + "hono": "4.10.3" }, "private": true } diff --git a/packages/appkit/src/views/w3m-connecting-view/index.tsx b/packages/appkit/src/views/w3m-connecting-view/index.tsx index b9745532..2dc718b0 100644 --- a/packages/appkit/src/views/w3m-connecting-view/index.tsx +++ b/packages/appkit/src/views/w3m-connecting-view/index.tsx @@ -32,7 +32,6 @@ export function ConnectingView() { const onRetry = () => { if (CoreHelperUtil.isAllowedRetry(lastRetry)) { setLastRetry(Date.now()); - WcController.clearUri(); initializeConnection(true); } else { SnackController.showError('Please wait a second before retrying'); @@ -46,6 +45,7 @@ export function ConnectingView() { const isPairingExpired = CoreHelperUtil.isPairingExpired(wcPairingExpiry); if (retry || isPairingExpired) { WcController.setWcError(false); + WcController.clearUri(); const connectPromise = connect({ wallet: routeData?.wallet @@ -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); @@ -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); + } } };