Browse Source

Don't allow setup process before LND is ready (#337)

beta
Luke Childs 4 years ago
committed by GitHub
parent
commit
d01aa7ce01
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 13
      src/views/Start.vue

13
src/views/Start.vue

@ -84,8 +84,8 @@
@click="nextStep"
:disabled="!isStepValid || isRegistering"
class="mt-3 mx-auto d-block px-4"
:class="{ 'loading-fade-blink': currentStep === 8 && !unlocked, 'invisible': currentStep === 5 && recover && !isStepValid }"
>{{ nextButtonText }}</b-button>
:class="{ 'loading-fade-blink': !isLndOperational || (currentStep === 8 && !unlocked), 'invisible': currentStep === 5 && recover && !isStepValid }"
>{{ !isLndOperational ? "Loading" : nextButtonText }}</b-button>
<b-button
variant="link"
size="sm"
@ -119,6 +119,8 @@ import Vue from "vue";
import VueConfetti from "vue-confetti";
import { mapState } from "vuex";
import delay from "@/helpers/delay";
import InputPassword from "@/components/Utility/InputPassword";
import Seed from "@/components/Utility/Seed";
import InputCopy from "@/components/Utility/InputCopy";
@ -183,6 +185,7 @@ export default {
},
computed: {
...mapState({
isLndOperational: state => state.lightning.operational,
registered: state => state.user.registered,
seed: state => state.user.seed,
unlocked: state => state.lightning.unlocked,
@ -354,6 +357,12 @@ export default {
return this.$router.push("/");
}
// Wait for LND
while (!this.isLndOperational) {
await this.$store.dispatch("lightning/getStatus");
await delay(1000);
}
//generate a new seed on load
this.$store.dispatch("user/getSeed");
},

Loading…
Cancel
Save