diff --git a/server.js b/server.js
deleted file mode 100644
index ab46055..0000000
--- a/server.js
+++ /dev/null
@@ -1,19 +0,0 @@
-var fs = require('fs');
-var http = require('http');
-//var https = require('https');
-
-//var certificate = fs.readFileSync('/etc/letsencrypt/live/zgo.cash/fullchain.pem');
-//var privateKey = fs.readFileSync('/etc/letsencrypt/live/zgo.cash/privkey.pem');
-
-//var credentials = {key: privateKey, cert: certificate};
-
-const app = require('./backend/app');
-const port = 3000;
-
-app.set('port', port);
-
-const httpServer = http.createServer(app);
-//const httpsServer = https.createServer(credentials, app);
-
-httpServer.listen(port);
-//httpsServer.listen(port);
diff --git a/src/app/items/item-list/item-list.component.html b/src/app/items/item-list/item-list.component.html
index 993d0e6..f88eb92 100644
--- a/src/app/items/item-list/item-list.component.html
+++ b/src/app/items/item-list/item-list.component.html
@@ -23,10 +23,10 @@
{{(item.cost/price) | number: '1.06'}}
+ height="16px">{{(item.cost/zecPrice) | number: '1.06'}}
[{{item.cost | number: '1.02' | currency: getCurrency() }}]
- ⓩ(item.cost/price)*100000000 | number: '1.0-0'}}
+ ⓩ(item.cost/zecPrice)*100000000 | number: '1.0-0'}}
diff --git a/src/app/items/item-list/item-list.component.ts b/src/app/items/item-list/item-list.component.ts
index 71343c9..edc7136 100644
--- a/src/app/items/item-list/item-list.component.ts
+++ b/src/app/items/item-list/item-list.component.ts
@@ -1,4 +1,4 @@
-import { Component, OnInit } from '@angular/core';
+import { Component, OnInit, Input } from '@angular/core';
import { MatDialog, MatDialogConfig} from '@angular/material/dialog';
import { Observable } from 'rxjs';
import { Item } from '../item.model';
@@ -19,6 +19,10 @@ import { ItemAddComponent } from '../item-add/item-add.component';
})
export class ItemListComponent implements OnInit{
+
+ @Input()
+ zecPrice: number = 1;
+
public items: Item[] = [];
owner: Owner = {
_id: '',
@@ -45,10 +49,8 @@ export class ItemListComponent implements OnInit{
expiration: new Date(Date.now()).toISOString(),
viewkey: ''
};
- public price: number = 1;
public ownerUpdate: Observable;
public itemsUpdate: Observable- ;
- public priceUpdate: Observable;
constructor(
public itemService: ItemService,
@@ -59,18 +61,13 @@ export class ItemListComponent implements OnInit{
) {
this.ownerUpdate = userService.ownerUpdate;
this.itemsUpdate = itemService.itemsUpdated;
- this.priceUpdate = fullnodeService.priceUpdate;
this.ownerUpdate.subscribe((owner) => {
this.owner = owner;
- fullnodeService.getPrice(this.owner.currency);
itemService.getItems(this.owner.address);
this.itemsUpdate.subscribe((items) => {
this.items = items;
});
});
- this.priceUpdate.subscribe((price) => {
- this.price = price;
- });
}
ngOnInit(){
diff --git a/src/app/viewer/viewer.component.html b/src/app/viewer/viewer.component.html
index aa272e5..6172894 100644
--- a/src/app/viewer/viewer.component.html
+++ b/src/app/viewer/viewer.component.html
@@ -14,7 +14,7 @@
diff --git a/src/app/viewer/viewer.component.ts b/src/app/viewer/viewer.component.ts
index 5056177..420dfb0 100644
--- a/src/app/viewer/viewer.component.ts
+++ b/src/app/viewer/viewer.component.ts
@@ -52,9 +52,11 @@ export class ViewerComponent implements OnInit {
expiration: new Date(Date.now()).toISOString(),
viewkey: ''
};
+ public price: number = 1;
public addrUpdate: Observable;
public ownerUpdate: Observable;
public userUpdate: Observable;
+ public priceUpdate: Observable;
orientation: boolean = false;
constructor(
@@ -65,6 +67,7 @@ export class ViewerComponent implements OnInit {
){
this.addrUpdate = fullnodeService.addrUpdate;
this.ownerUpdate = userService.ownerUpdate;
+ this.priceUpdate = fullnodeService.priceUpdate;
this.ownerUpdate.subscribe((owner) => {
this.owner = owner;
});
@@ -72,6 +75,9 @@ export class ViewerComponent implements OnInit {
this.userUpdate.subscribe((user) => {
this.user = user;
});
+ this.priceUpdate.subscribe((price) => {
+ this.price = price;
+ });
}
ngOnInit(){