Fix last update timestamp in price feed service

This commit is contained in:
Devin Bileck 2018-09-27 12:55:02 -07:00
parent 5c66385834
commit 3663d6cf14
No known key found for this signature in database
GPG Key ID: 38750B26EA8B8C93

View File

@ -280,13 +280,13 @@ public class PriceFeedService {
} }
public Date getLastRequestTimeStampBtcAverage() { public Date getLastRequestTimeStampBtcAverage() {
return new Date(epochInSecondAtLastRequest * 1000); return new Date(epochInSecondAtLastRequest);
} }
public Date getLastRequestTimeStampPoloniex() { public Date getLastRequestTimeStampPoloniex() {
Long ts = timeStampMap.get("btcAverageTs"); Long ts = timeStampMap.get("btcAverageTs");
if (ts != null) { if (ts != null) {
return new Date(ts * 1000); return new Date(ts);
} else } else
return new Date(); return new Date();
} }
@ -294,7 +294,7 @@ public class PriceFeedService {
public Date getLastRequestTimeStampCoinmarketcap() { public Date getLastRequestTimeStampCoinmarketcap() {
Long ts = timeStampMap.get("coinmarketcapTs"); Long ts = timeStampMap.get("coinmarketcapTs");
if (ts != null) { if (ts != null) {
return new Date(ts * 1000); return new Date(ts);
} else } else
return new Date(); return new Date();
} }