diff --git a/front/src/components/main/TonWallet.tsx b/front/src/components/main/TonWallet.tsx
index f0e50806..d7ab8b19 100644
--- a/front/src/components/main/TonWallet.tsx
+++ b/front/src/components/main/TonWallet.tsx
@@ -27,22 +27,22 @@ const TonWallet = ({ nickname, message, type }) => {
}
const handleSwitchWalletFunction = () => {
- if (connected) {
- console.log(">>> Send message to bacend");
- } else {
- tonConnectUI.disconnect();
-
- const d = toBase64(toAscii(data));
-
- tonConnectUI.setConnectRequestParameters({
- state: "ready",
- value: {
- tonProof: d,
- },
- });
-
- tonConnectUI.connectWallet();
- }
+ // if (connected) {
+ // console.log(">>> Send message to bacend");
+ // } else {
+ tonConnectUI.disconnect();
+
+ const d = toBase64(toAscii(data));
+
+ tonConnectUI.setConnectRequestParameters({
+ state: "ready",
+ value: {
+ tonProof: d,
+ },
+ });
+
+ tonConnectUI.connectWallet();
+ // }
};
return (
diff --git a/front/src/pages/Main/Main.tsx b/front/src/pages/Main/Main.tsx
index 9919da47..0fa2e83d 100644
--- a/front/src/pages/Main/Main.tsx
+++ b/front/src/pages/Main/Main.tsx
@@ -38,6 +38,7 @@ const Main = () => {
const [passportProof, setPassportProof] = useState();
const [textProof, setTextProof] = useState();
+ const [apiLoading, setApiLoading] = useState(false);
const [step, setStep] = useState(Steps.INITIAL);
@@ -57,6 +58,7 @@ const Main = () => {
async function sendProofCall() {
try {
+ setApiLoading(true);
const { address, publicKey } = wallet.account || {};
const d = {
@@ -79,6 +81,7 @@ const Main = () => {
} catch (error) {
console.error(error);
}
+ setApiLoading(false);
}
// @ts-ignore
@@ -208,6 +211,12 @@ const Main = () => {
>
);
+ } else if (apiLoading) {
+ actionBarContent = (
+ <>
+
+ >
+ );
} else {
actionBarContent = (
<>