Skip to content

Commit

Permalink
close #82
Browse files Browse the repository at this point in the history
  • Loading branch information
brenzi committed Nov 4, 2024
1 parent 5a4ce44 commit 08bb5cb
Showing 1 changed file with 25 additions and 5 deletions.
30 changes: 25 additions & 5 deletions pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1107,7 +1107,7 @@ import {
INCOGNITEE_TX_FEE,
INCOGNITEE_UNSHIELDING_FEE,
} from "../configs/incognitee";
import { useSystemHealth } from "@/store/systemHealth";
import { useSystemHealth, Health } from "@/store/systemHealth";
import WarningBanner from "@/components/ui/WarningBanner.vue";

const router = useRouter();
Expand Down Expand Up @@ -1151,7 +1151,12 @@ const selectTab = (tab) => {
};

const submitSendForm = () => {
// Handle the form submission here
if (systemHealth.getSidechainSystemHealth.overall() !== Health.Healthy) {
alert(
"Sidechain health currently can't be assessed. Please wait for a green health indicator and try again",
);
return;
}
openStatusOverlay();
closePrivateSendOverlay();
sendPrivately();
Expand All @@ -1165,19 +1170,34 @@ const submitShieldForm = async () => {
);
return;
}
// Handle the form submission here
if (systemHealth.getSidechainSystemHealth.overall() !== Health.Healthy) {
alert(
"Sidechain health currently can't be assessed. Please wait for a green health indicator and try again",
);
return;
}
openStatusOverlay();
closeShieldOverlay();
await shield();
};
const submitUnshieldForm = async () => {
// Handle the form submission here
if (systemHealth.getSidechainSystemHealth.overall() !== Health.Healthy) {
alert(
"Sidechain health currently can't be assessed. Please wait for a green health indicator and try again",
);
return;
}
openStatusOverlay();
closeUnshieldOverlay();
await unshield();
};
const submitGuessForm = async () => {
// Handle the form submission here
if (systemHealth.getSidechainSystemHealth.overall() !== Health.Healthy) {
alert(
"Sidechain health currently can't be assessed. Please wait for a green health indicator and try again",
);
return;
}
openStatusOverlay();
closeGuessTheNumberOverlay();
await submitGuess();
Expand Down

0 comments on commit 08bb5cb

Please sign in to comment.