Fix fiatBalance

This commit is contained in:
Maciej Małecki 2014-04-14 15:41:06 +02:00
parent 83a69f1c56
commit dd80eecdfb

View file

@ -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