diff --git a/src/pages/root/steps/presubmit-step/index.tsx b/src/pages/root/steps/presubmit-step/index.tsx index 2eb3bfb..db44819 100644 --- a/src/pages/root/steps/presubmit-step/index.tsx +++ b/src/pages/root/steps/presubmit-step/index.tsx @@ -97,8 +97,6 @@ export const PresubmitStep = ({ prevStep }: PresubmitStepProps) => { if (transactionResponse.boc) { WebApp.close(); - - await tonConnectUI.disconnect(); } else { console.error("Transaction failed:", transactionResponse); } @@ -107,7 +105,7 @@ export const PresubmitStep = ({ prevStep }: PresubmitStepProps) => { WebApp.close(); // @ts-expect-error Type issues } catch (error: never) { - await tonConnectUI.disconnect(); + console.error("An error occurred during the submission process:", error); diff --git a/src/pages/view-content/index.tsx b/src/pages/view-content/index.tsx index a15f714..cc44e5a 100644 --- a/src/pages/view-content/index.tsx +++ b/src/pages/view-content/index.tsx @@ -42,13 +42,10 @@ export const ViewContentPage = () => { if (transactionResponse.boc) { WebApp.close(); - - await tonConnectUI.disconnect(); } else { console.error("Transaction failed:", transactionResponse); } } catch (error) { - await tonConnectUI.disconnect(); console.error("Error handling Ton Connect subscription:", error); } }, [content]); diff --git a/src/shared/services/auth/index.ts b/src/shared/services/auth/index.ts index 2d55ce7..b6e236f 100644 --- a/src/shared/services/auth/index.ts +++ b/src/shared/services/auth/index.ts @@ -78,15 +78,12 @@ export const useAuth = () => { sessionStorage.setItem(sessionStorageKey, res?.data?.auth_v1_token); } else { alert("Please try another wallet"); - tonConnectUI.disconnect(); } }) .catch((error: any) => { console.error("Error in authentication request: ", error); throw new Error("Failed to authenticate."); }); - } else { - void tonConnectUI.disconnect(); } }); };