Skip to content

Commit

Permalink
Merge pull request #3033 from egorFiNE/ef-gateio-datetime
Browse files Browse the repository at this point in the history
gateio: (minor) do not crash in parseOrder() on empty timestamp
  • Loading branch information
kroitor committed Jun 5, 2018
2 parents 17d2a56 + ea4b599 commit bef654a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions js/gateio.js
Expand Up @@ -354,9 +354,12 @@ module.exports = class gateio extends Exchange {
}
if (typeof market !== 'undefined')
symbol = market['symbol'];
let datetime = undefined;
let timestamp = this.safeInteger (order, 'timestamp');
if (typeof timestamp !== 'undefined')
if (typeof timestamp !== 'undefined') {
timestamp *= 1000;
datetime = this.iso8601 (timestamp);
}
let status = this.safeString (order, 'status');
if (typeof status !== 'undefined')
status = this.parseOrderStatus (status);
Expand All @@ -378,7 +381,7 @@ module.exports = class gateio extends Exchange {
}
return {
'id': id,
'datetime': this.iso8601 (timestamp),
'datetime': datetime,
'timestamp': timestamp,
'status': status,
'symbol': symbol,
Expand Down

0 comments on commit bef654a

Please sign in to comment.