Commit 09a2e498 authored by dev0tion's avatar dev0tion

Add temporary redirect after wallet creation

parent 9b2b998d
......@@ -34,7 +34,7 @@
<div class="row">
<div class="col" id="mnemonic">
<label>Mnemonic:</label>
<label>{{responseMessage}}</label>
<label>{{ mnemonic }}</label>
</div>
</div>
</div>
......@@ -22,8 +22,7 @@ export class CreateComponent {
private createWalletForm: FormGroup;
private newWallet: WalletCreation;
private responseMessage: string;
private errorMessage: string;
private mnemonic: string;
private buildCreateForm(): void {
this.createWalletForm = this.fb.group({
......@@ -94,13 +93,15 @@ export class CreateComponent {
.subscribe(
response => {
if (response.status >= 200 && response.status < 400){
this.responseMessage = response.json();
this.mnemonic = response.json();
alert("Your wallet has been created. Please write down your 12 word passphrase: \n" + this.mnemonic + "\nYou will be redirected to the decryption page.");
this.router.navigate(['']);
}
},
error => {
if (error.status >= 400) {
this.errorMessage = error;
console.log(this.errorMessage);
let errorMessage = error;
console.log(errorMessage);
}
}
);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment