| remove wallet disconnection

This commit is contained in:
rakhimovkamran 2024-08-24 03:15:45 +05:00
parent 2440fdf61a
commit 1e7e773cb1
3 changed files with 1 additions and 9 deletions

View File

@ -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);

View File

@ -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]);

View File

@ -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();
}
});
};