|
@@ -11,17 +11,17 @@ import { FormGroup, FormBuilder, Validators } from '@angular/forms';
|
11
|
11
|
})
|
12
|
12
|
export class WalletPage {
|
13
|
13
|
|
14
|
|
- transactionForm : FormGroup;
|
15
|
|
- transaction : Transaction;
|
|
14
|
+
|
|
15
|
+ // transactionForm : FormGroup;
|
|
16
|
+
|
|
17
|
+ // senderPublicKey: any;
|
|
18
|
+ // recipientPublicKey: any;
|
|
19
|
+ // amount: any;
|
|
20
|
+ transaction: any;
|
16
|
21
|
wallets: Array<any>;
|
17
|
22
|
|
18
|
23
|
constructor(public navCtrl: NavController, public navParams: NavParams,
|
19
|
|
- public transactionService: TransactionService, private formBuilder : FormBuilder) {
|
20
|
|
- this.transactionForm = this.formBuilder.group({
|
21
|
|
- senderPublicKey: ['', Validators.required],
|
22
|
|
- recipientPublicKey: ['', Validators.required],
|
23
|
|
- amount: ['', Validators.required]
|
24
|
|
- })
|
|
24
|
+ public transactionService: TransactionService){
|
25
|
25
|
}
|
26
|
26
|
|
27
|
27
|
ionViewDidLoad() {
|
|
@@ -36,7 +36,6 @@ export class WalletPage {
|
36
|
36
|
}
|
37
|
37
|
|
38
|
38
|
createTransaction(){
|
39
|
|
- this.transaction = this.transactionForm.value;
|
40
|
39
|
this.transactionService.createTransaction(this.transaction).subscribe(data => this.transaction = data as Transaction,
|
41
|
40
|
err => {
|
42
|
41
|
console.log(err);
|