Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
brenzi committed Nov 5, 2024
2 parents 7f6395e + 08bb5cb commit f846e69
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 9 deletions.
Binary file removed assets/.DS_Store
Binary file not shown.
3 changes: 2 additions & 1 deletion components/ui/ChooseWalletOverlay.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<template>
<OverlayDialog :show="show" :close="close" title="Access Your Wallet!">
<div class="mt-2">
<p class="text-sm text-gray-400">How would you like to connect?</p>
<div v-if="hasCreateTestingAccountFn" class="mt-4">
<p class="text-sm text-gray-400">How would you like to connect?</p>
<br />
<button
@click="createTestingAccount"
class="incognitee-bg btn btn_gradient rounded-md px-3.5 py-2.5 text-sm font-semibold text-white shadow-sm hover:bg-indigo-400 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-400"
Expand Down
46 changes: 38 additions & 8 deletions pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,13 @@
Unshielding is the process of moving funds from your private balance on
Incognitee to publicly visible (naked) L1.
</p>
<div v-if="shieldingLimit < Infinity">
<p class="text-sm text-gray-400 text-left my-4">
During beta phase, you can only shield up to
{{ shieldingLimit }} {{ accountStore.getSymbol }} which includes your
current private balance on incognitee.
</p>
</div>
<form class="mt-5" @submit.prevent="submitUnshieldForm">
<div class="flex flex-col">
<label
Expand Down Expand Up @@ -572,9 +579,12 @@
step="0.1"
:min="1.1"
:max="
accountStore.getDecimalBalanceFree(incogniteeSidechain) -
accountStore.getDecimalExistentialDeposit(incogniteeSidechain) -
0.1
Math.min(
accountStore.getDecimalBalanceFree(incogniteeSidechain) -
accountStore.getDecimalExistentialDeposit(incogniteeSidechain) -
0.1,
shieldingLimit,
)
"
required
class="w-full text-sm rounded-lg flex-grow py-2 bg-cool-900 text-white placeholder-gray-500 border border-green-500 text-right"
Expand Down Expand Up @@ -1097,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 @@ -1141,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 @@ -1155,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 f846e69

Please sign in to comment.