Commit graph

13 commits

Author SHA1 Message Date
Maciej Małecki
49f77c50b8 Bring back trading to fiatBalance 2014-04-21 00:37:12 +02:00
Maciej Małecki
d83a46bf7d Default to Trader's currency 2014-04-21 00:37:12 +02:00
Maciej Małecki
a6687964ba Add Trader#_consolidateTrades 2014-04-17 13:02:36 +02:00
Maciej Małecki
b79bdf8789 Start adding trading back to Trader 2014-04-16 17:09:39 +02:00
Maciej Małecki
8cb9783bde JSHint trader 2014-04-16 14:58:44 +02:00
Maciej Małecki
8276d87e2a Add optional callback to pollRate 2014-04-16 10:12:38 +02:00
Maciej Małecki
5b53d59cba Add optional callback to pollBalance 2014-04-16 10:01:31 +02:00
Maciej Małecki
926e10da01 Add stopPolling method 2014-04-16 09:36:04 +02:00
Maciej Małecki
230b31cdbe Fix sendBitcoins 2014-04-15 16:26:09 +02:00
Maciej Małecki
26ae44b2a7 Remove balance calculation for trading
Trading feature is not used in production, remove it for now.
2014-04-15 14:32:43 +02:00
Maciej Małecki
dd80eecdfb Fix fiatBalance 2014-04-14 15:41:06 +02:00
Maciej Małecki
1f3c59dbc0 More refactoring on Trader 2014-04-14 15:16:53 +02:00
Maciej Małecki
d6a0f17e80 Get started with Trade class
The reason for isolating the trader class is testability. It's hard to
properly test code with as much global state as files in `lib/api` had.

With a `Trader` class we can easily instantiate multiple objects, with
different configs, without the need for seeding the database with test
configs, effectively enabling us to do unit tests as well as integration
tests.

Besides that, this will allow easier reconfiguration, thanks to
`Trader#configure` method.
2014-04-14 13:06:48 +02:00