diff --git a/lib/trader.js b/lib/trader.js index 2175dd1c..81de3832 100644 --- a/lib/trader.js +++ b/lib/trader.js @@ -81,7 +81,7 @@ Trader.prototype.configure = function (config) { * return balance in satoshis */ Trader.prototype.fiatBalance = function (transferSatoshis, tradeFiat) { - var rate = this.rate; + var rate = this.rate(this.config.exchanges.settings.currency).rate; var balance = this.balance; var commission = this.config.exchanges.settings.commission; @@ -92,7 +92,7 @@ Trader.prototype.fiatBalance = function (transferSatoshis, tradeFiat) { // `lowBalanceMargin` is our safety net. It's a number > 1, and we divide // all our balances by it to provide a safety margin. - var lowBalanceMargin = this.config.settings.lowBalanceMargin; + var lowBalanceMargin = this.config.exchanges.settings.lowBalanceMargin; // `balance.transferBalance` is the balance of our transfer account (the one // we use to send Bitcoins to clients). `transferSatoshis` is the number