Fix bug on order saving
This commit is contained in:
parent
d61a1169fd
commit
ba631ebf24
1 changed files with 25 additions and 26 deletions
|
@ -18,7 +18,7 @@ export class OrderService {
|
|||
address: '',
|
||||
session: '',
|
||||
blocktime: 0,
|
||||
expiration: 0,
|
||||
expired: false,
|
||||
pin: '',
|
||||
validated: false
|
||||
},
|
||||
|
@ -193,9 +193,9 @@ export class OrderService {
|
|||
|
||||
closeOrder(){
|
||||
this.fullnodeService.priceUpdate.subscribe((price) => {
|
||||
console.log('Price:', price);
|
||||
this.dataStore.order.closed = true;
|
||||
this.dataStore.order.price = price;
|
||||
});
|
||||
this.dataStore.order.closed = true;
|
||||
let obs = this.http.post<{message: string, order: Order}>(this.beUrl+'api/order', {order: this.dataStore.order}, { headers: this.reqHeaders });
|
||||
obs.subscribe((orderData) => {
|
||||
console.log('Closed order', orderData);
|
||||
|
@ -219,7 +219,6 @@ export class OrderService {
|
|||
this._orderUpdated.next(Object.assign({}, this.dataStore).order);
|
||||
});
|
||||
return obs;
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue