Skip to content
This repository has been archived by the owner on Feb 16, 2020. It is now read-only.

GDAX Fix from #1808 #1818

Merged
merged 1 commit into from
Jan 30, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions exchanges/gdax.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,15 +213,15 @@ Trader.prototype.getOrder = function(order, callback) {
};

Trader.prototype.cancelOrder = function(order, callback) {
// callback for cancelOrder should be true if the order was already filled, otherwise false
var result = function(err, data) {
if(err) {
log.error('Error cancelling order:', err);
callback(true); // need to catch the specific error but usually an error on cancel means it was filled
}
// callback for cancelOrder should be true if the order was already filled, otherwise false
var result = function(err, data) {
if(err) {
log.error('Error cancelling order:', err);
return callback(true); // need to catch the specific error but usually an error on cancel means it was filled
}

callback(false);
};
return callback(false);
};

let handler = cb =>
this.gdax.cancelOrder(order, this.handleResponse('cancelOrder', cb));
Expand Down