Add new createTransaction method

This commit is contained in:
kevinpauer
2022-04-02 12:44:50 +02:00
parent c5e66b4720
commit 9de1258f7f
5 changed files with 53 additions and 11 deletions

View File

@@ -45,8 +45,8 @@ const ELEMENT_DATA: PeriodicElement[] = [
export interface TransactionData {
symbol: string;
time: Date;
count: number;
time: string;
count: BigInt;
price: number;
}

View File

@@ -25,11 +25,17 @@ export class UserDialogComponent implements OnInit {
onSubmit() {
console.log(this.data);
this.dataService.createTransaction(
this.data.symbol,
this.data.time,
this.data.count,
this.data.price
console.log(
this.dataService
.createTransaction(
this.data.symbol,
this.data.time,
this.data.count,
this.data.price
)
.subscribe((data) => {
console.log(data);
})
);
this.dialog.closeAll();
}