Fix last market price
-The last market price was not properly checking against trading pairs and was updating based on all pairs for the default exchange which could potentially cause non-BTC markets to show a much higher last price value than normal
This commit is contained in:
+2
-2
@@ -779,8 +779,8 @@ module.exports = {
|
||||
history: obj.trades,
|
||||
summary: obj.stats
|
||||
}, function() {
|
||||
// check if this is the default market
|
||||
if (market == settings.markets_page.default_exchange.exchange_name) {
|
||||
// check if this is the default market and trading pair and that the price is recorded in BTC
|
||||
if (market == settings.markets_page.default_exchange.exchange_name && settings.markets_page.default_exchange.trading_pair.toUpperCase() == coin_symbol.toUpperCase() + '/' + pair_symbol.toUpperCase() && pair_symbol.toUpperCase() == 'BTC') {
|
||||
// this is the default market so update the last price stats
|
||||
Stats.updateOne({coin: settings.coin.name}, {
|
||||
last_price: obj.stats.last,
|
||||
|
||||
Reference in New Issue
Block a user