Skip to content

Commit

Permalink
Uppercase fix and getCapabilities fix
Browse files Browse the repository at this point in the history
  • Loading branch information
cmroche authored and askmike committed Feb 16, 2018
1 parent 24d50a5 commit 08ccac6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions exchanges/quadriga.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,12 @@ Trader.prototype.getPortfolio = function(callback) {
var currencyAmount = parseFloat( data[this.currency + '_available'] );

if(!_.isNumber(assetAmount) || _.isNaN(assetAmount)) {
log.error(`Quadriga did not return balance for ${this.asset}, assuming 0.`);
log.error(`Quadriga did not return balance for ${this.asset.toLowerCase()}, assuming 0.`);
assetAmount = 0;
}

if(!_.isNumber(currencyAmount) || _.isNaN(currencyAmount)) {
log.error(`Quadriga did not return balance for ${this.currency}, assuming 0.`);
log.error(`Quadriga did not return balance for ${this.currency.toLowerCase()}, assuming 0.`);
currencyAmount = 0;
}

Expand Down Expand Up @@ -137,7 +137,7 @@ Trader.prototype.getTicker = function(callback) {

Trader.prototype.roundAmount = function(amount) {
var precision = 100000000;
var market = this.getCapabilities().markets.find(function(market){ return market.pair[0] === this.currency && market.pair[1] === this.asset });
var market = Trader.getCapabilities().markets.find(function(market){ return market.pair[0] === this.currency && market.pair[1] === this.asset });

if(Number.isInteger(market.precision))
precision = 10 * market.precision;
Expand Down

0 comments on commit 08ccac6

Please sign in to comment.