Skip to content

Commit

Permalink
Fixing some misplaced variables
Browse files Browse the repository at this point in the history
Some variables were incorrect
  • Loading branch information
nibzo1 authored May 27, 2017
1 parent 586bb69 commit 2a28d62
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions extensions/kraken/exchange.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ module.exports = function container(get, set, clear) {
asset: 0,
currency: 0
};
if (error || data.error.length) {
if (err || data.error.length) {
console.error('\ggetBalance error:')
console.error(data)
return retry('getBalance', args)
Expand All @@ -111,18 +111,18 @@ module.exports = function container(get, set, clear) {
getQuote: function (opts, cb) {
var args = [].slice.call(arguments);
var client = publicClient();

var pair = joinProduct(opts.product_id)
client.api('Ticker', {
pair: joinProduct(opts.product_id)
pair: pair
}, function (error, data) {
if (error || data.error.length) {
console.error('\ggetQuote error:')
console.error(data)
return retry('getQuote', args)
}
cb(null, {
bid: data.result[opts.pair].b[0],
ask: data.result[opts.pair].a[0],
bid: data.result[pair].b[0],
ask: data.result[pair].a[0],
})
});
},
Expand Down Expand Up @@ -205,7 +205,7 @@ module.exports = function container(get, set, clear) {
if(!orderData) {
return cb('Order not found');
}

var order = {
id: orderData.refid,
status: orderData.status,
Expand All @@ -226,4 +226,4 @@ module.exports = function container(get, set, clear) {
}
}
return exchange
}
}

0 comments on commit 2a28d62

Please sign in to comment.