Commit 4d60bfc8 authored by dev0tion's avatar dev0tion

Adjust create component to new API specs

parent 81d57854
......@@ -26,6 +26,6 @@
<label>Mnemonic:</label>
</div>
<div>
<label>{{body}}</label>
<label>{{responseMessage}}</label>
</div>
</div>
\ No newline at end of file
......@@ -2,7 +2,7 @@ import { Component, Injectable } from '@angular/core';
import { ApiService } from '../../shared/api/api.service';
import { SafeCreation } from '../../shared/safe-creation';
import { WalletCreation } from '../../shared/wallet-creation';
import { Mnemonic } from '../../shared/mnemonic';
@Component({
......@@ -14,19 +14,15 @@ import { Mnemonic } from '../../shared/mnemonic';
export class CreateComponent {
constructor(private apiService: ApiService) {}
private newWallet: SafeCreation;
private body: string;
private newWallet: WalletCreation;
private responseMessage: string;
private createWallet(password: string, network: string, folderPath: string, name: string, ) {
this.newWallet.password = password;
this.newWallet.network = network;
this.newWallet.folderPath = folderPath;
this.newWallet.name = name;
this.apiService
.createWallet(this.newWallet)
//.map(res => {let body = res.text()})
.subscribe((response: string) => this.body = response,
() => console.log("createWallet() complete from init"));
.subscribe((response: string) => this.responseMessage = response);
}
}
export class WalletCreation {
password: string;
network: string;
}
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