diff --git a/lib/routes.js b/lib/routes.js index 3ed539e8..83f70577 100644 --- a/lib/routes.js +++ b/lib/routes.js @@ -18,7 +18,7 @@ Error.prototype.toJSON = function () { }; var poll = function(req, res) { - var rateRec = _trader.rate(req.params.currency); + var rateRec = _trader.rate(); var satoshiBalanceRec = _trader.balance; // `rateRec` and `satoshiBalanceRec` are both objects, so there's no danger @@ -40,8 +40,14 @@ var poll = function(req, res) { res.json({ err: null, rate: rate * _trader.config.exchanges.settings.commission, - fiat: _trader.fiatBalance(0, 0), - currency: req.params.currency, + fiat: _trader.fiatBalance(0, 0) + 100, + locale: { + currency: 'CHF', + localeInfo: { + primaryLocale: 'en-CA', + primaryLocales: ['en-CA'] + } + }, txLimit: parseInt(_trader.config.exchanges.settings.compliance.maximum.limit, 10) }); }; @@ -81,7 +87,7 @@ exports.init = function(app, config, trader, authMiddleware) { _lamassuConfig = config; _trader = trader; - app.get('/poll/:currency', authMiddleware, poll); + app.get('/poll', authMiddleware, poll); app.post('/send', authMiddleware, send); app.post('/trade', authMiddleware, trade); app.post('/pair', pair); diff --git a/lib/trader.js b/lib/trader.js index 977062be..116bfb70 100644 --- a/lib/trader.js +++ b/lib/trader.js @@ -254,6 +254,6 @@ Trader.prototype.pollRate = function (callback) { }); }; -Trader.prototype.rate = function (currency) { - return this.rates[currency]; +Trader.prototype.rate = function () { + return this.rates[this.config.exchanges.settings.currency]; };