diff --git a/src/pegin/components/create/PegInForm.vue b/src/pegin/components/create/PegInForm.vue
index 07724772..06c49c6b 100644
--- a/src/pegin/components/create/PegInForm.vue
+++ b/src/pegin/components/create/PegInForm.vue
@@ -27,40 +27,33 @@
Select mode to see exact amounts
-
+
-
+
Fast Mode is unavailable at this time.
-
+
Fast mode will be
available in
{{ countdown }} seconds.
-
-
-
-
-
-
-
- Fast Mode no quotes available for this amount.
-
-
+
Fast Mode
There is not enough liquidity for this amount.
Contact support if you want to use the fast mode.
+
+ Fast Mode no quotes available for this amount.
+
+
+ Fast Mode
+ You don't have enough funds to cover the amount including fees.
+
-
+
('pegInTx', 'loadingFee');
const startCountdown = useAction('web3Session', constants.SESSION_COUNTDOWN_GRECAPTCHA_TIME);
const countdown = useStateAttribute('web3Session', 'grecaptchaCountdown');
- const recaptchanNewTokenTime = EnvironmentAccessorService.getEnvironmentVariables()
+ const recaptchaNewTokenTime = EnvironmentAccessorService.getEnvironmentVariables()
.grecaptchaTime;
const toQr = ref(false);
const router = useRouter();
@@ -231,7 +231,7 @@ export default defineComponent({
const flyoverIsEnabled = computed(() => {
if (props.isFlyoverAvailable) {
if (sendingPegin.value) return true;
- return countdown.value === recaptchanNewTokenTime;
+ return countdown.value === recaptchaNewTokenTime;
}
return false;
});
@@ -245,6 +245,14 @@ export default defineComponent({
return selectedAccountBalance.value?.gte(fullAmount);
});
+ const fastModeState = computed(() => {
+ if (!flyoverIsEnabled.value) return 'disabled';
+ if (!enoughFlyoverLiquidity.value) return 'no-liquidity';
+ if (peginQuotes.value.length === 0) return 'no-quotes';
+ if (!enoughAmountFlyover.value) return 'insufficient-funds';
+ return 'available';
+ });
+
function back() {
pegInFormState.value.send('loading');
clearQuotes();
@@ -375,7 +383,7 @@ export default defineComponent({
&& !!flyoverPeginState.value.selectedQuoteHash
&& !!flyoverPeginState.value.rootstockRecipientAddress
&& flyoverPeginState.value.rootstockRecipientAddress !== '0x'
- && countdown.value === recaptchanNewTokenTime;
+ && countdown.value === recaptchaNewTokenTime;
}
return false;
@@ -434,11 +442,12 @@ export default defineComponent({
sendTx,
flyoverIsEnabled,
countdown,
- recaptchanNewTokenTime,
+ recaptchaNewTokenTime,
mdiQrcode,
toQr,
enoughFlyoverLiquidity,
enoughAmountFlyover,
+ fastModeState,
};
},
});