Skip to content

Commit

Permalink
Fixed missing date conversion to resolve #32.
Browse files Browse the repository at this point in the history
Free Software Free Society

To support commits by ctubio,
you can buy-me-a-drink with a small git tip at:
  1GitTipgxvKB3zjCLXRcSgDhC9pivkpc7u

I promise to drink chocolate milk in the development of the next commit.

To request new features or in case this commit breaks something for you,
please create a new github issue with all possible details,
but never share your API Keys!

Signed-off-by: Carles Tubio <ctubio@users.noreply.github.com>
  • Loading branch information
ctubio committed Jun 29, 2017
1 parent 09c4cf9 commit 16d50c0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
'dependencies': [ 'K' ],
'copies': [{
'files': [ '<(PRODUCT_DIR)/K.node' ],
'destination': 'app/lib'
'destination': 'app/server/lib'
}]
}]
}
4 changes: 2 additions & 2 deletions src/server/main.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require('events').EventEmitter.prototype._maxListeners = 30;
const packageConfig = require("./../../package.json");
const bindings = require('../lib/K.node');
const bindings = require('./lib/K.node');
import path = require("path");
import express = require('express');
import request = require('request');
Expand Down Expand Up @@ -176,7 +176,7 @@ for (const param in defaultQuotingParameters)
const sqlite = new bindings.SQLite(exchange, pair.base, pair.quote);

const initParams = Object.assign(defaultQuotingParameters, sqlite.load(Models.Topics.QuotingParametersChange)[0] || {});
const initTrades = sqlite.load(Models.Topics.Trades);
const initTrades = sqlite.load(Models.Topics.Trades).map(x => Object.assign(x, {time: new Date(x.time)}));
const initRfv = sqlite.load(Models.Topics.FairValue);
const initMkt = sqlite.load(Models.Topics.MarketData);

Expand Down

0 comments on commit 16d50c0

Please sign in to comment.