Commit graph

2412 commits

Author SHA1 Message Date
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
5e4369da27 Remove empty file 2014-04-16 09:19:39 +02:00
Maciej Małecki
1900d74287 Mock pollRate instead 2014-04-15 19:24:36 +02:00
Maciej Małecki
34fb7e7daf Add node-uuid to dev deps 2014-04-15 19:24:21 +02:00
Maciej Małecki
74b5c72b5d Add a basic test for sending bitcoins 2014-04-15 16:26:20 +02:00
Maciej Małecki
230b31cdbe Fix sendBitcoins 2014-04-15 16:26:09 +02:00
Maciej Małecki
36081c4109 Use new Trader API to send bitcoins 2014-04-15 15:07:46 +02:00
Maciej Małecki
1003629341 testkeys were moved to test/fixtures 2014-04-15 15:03:36 +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
206b33ec38 Make fiat balance test use new Trader API
Leave out the trading part for now since nobody is using this feature in
production.
2014-04-15 12:08:39 +02:00
Maciej Małecki
06242fe78a Add tests for exchange creation 2014-04-15 11:17:50 +02:00
Maciej Małecki
8ccf5bbf9e Add a test for Trader API 2014-04-15 11:06:09 +02:00
Maciej Małecki
0666762051 Add a comment about rateRec and its friend 2014-04-15 10:47:32 +02:00
Maciej Małecki
b4199a3e1f Fix server initialization message 2014-04-14 15:43:59 +02:00
Maciej Małecki
dd80eecdfb Fix fiatBalance 2014-04-14 15:41:06 +02:00
Maciej Małecki
83a69f1c56 Fix fiatBalance call 2014-04-14 15:36:50 +02:00
Maciej Małecki
1f3c59dbc0 More refactoring on Trader 2014-04-14 15:16:53 +02:00
Maciej Małecki
05fef31fce -x lib/app.js 2014-04-14 14:37:28 +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
Maciej Małecki
b2d643cf1d Do not re-assign 2014-04-12 13:55:03 +02:00
Maciej Małecki
818f48398c Fix https 2014-04-11 05:08:38 +02:00
Maciej Małecki
c245c528f0 Fix location and lamassu-config API in tests 2014-04-11 04:52:49 +02:00
Maciej Małecki
73f1f31fd9 Fix listen logging 2014-04-11 04:48:07 +02:00
Maciej Małecki
02fcc42638 Make lib/app.js a factory for lamassu-server
Extract all command line parsing to `bin/lamassu-server`.

This will effectively make it easier to write tests for
`lamassu-server`.
2014-04-11 04:30:22 +02:00
Maciej Małecki
3932e17b2e Move atm-api.js to routes.js 2014-04-11 03:32:37 +02:00
Maciej Małecki
bd1963fb6a Remove /config endpoint
We seem to have went with stashing relevant configuration onto
`/poll/:currency` result.
2014-04-11 03:16:17 +02:00
Maciej Małecki
204932f4f9 Remove unused devDeps 2014-04-11 02:27:56 +02:00
Maciej Małecki
b980b77815 Add required dev dependencies 2014-04-11 02:27:00 +02:00
Maciej Małecki
5e99e40a38 Add a test script 2014-04-11 01:22:24 +02:00
Maciej Małecki
016f1351bd Move tests 2014-04-11 01:14:28 +02:00
Maciej Małecki
f376e96ab2 Start the refactor 2014-04-10 12:09:29 +02:00
Maciej Małecki
e5b94527a9 Attach device object from isAuthorized to request 2014-04-07 08:29:42 +07:00
Maciej Małecki
d80758e834 Remove unused cookieParser and session middlewares 2014-04-07 08:29:35 +07:00
Maciej Małecki
d1ec529de4 Bump version to 0.2.0 2014-04-04 09:49:53 +07:00
Maciej Małecki
42b5a264fe Use lamassu-config@0.2.0 2014-04-04 05:35:21 +07:00
Maciej Małecki
063cb07777 Remove deploy.sh 2014-04-04 03:04:17 +07:00
Maciej Małecki
e549764a66 Simplify connection string
We're using `DATABASE_URL` environment variable anyway.
2014-04-04 02:37:45 +07:00
Maciej Małecki
4984fcb90a Depend on lamassu-atm-protocol@0.2.0 2014-04-04 00:23:29 +07:00
Josh Harvey
0840a40bfc removed duplicate require 2014-04-02 16:48:20 -04:00
Josh Harvey
415ebd979d renamed to UNLICENSE 2014-03-31 18:26:42 -04:00
Maciej Małecki
6926e7be90 Merge pull request #5 from lamassu/tls-security
Client certificate authorization
2014-03-28 17:29:49 +07:00
Josh Harvey
cf520a331e removed client-certificate-auth 2014-03-24 01:10:50 -04:00
Josh Harvey
c6db15b154 fixed ATM authorizing 2014-03-24 01:01:48 -04:00
Josh Harvey
f8c507bb1c fixed dependency 2014-03-20 17:00:44 -04:00
Maciej Małecki
3a4fe7738e Pass authMiddleware and config to lamassu-atm-protocol 2014-03-18 02:24:40 +01:00
Maciej Małecki
9f32dddf19 Use HTTPS by default and accept --key and --cert 2014-03-17 21:55:14 +01:00
Maciej Małecki
784914be7a Add ciphers 2014-03-17 21:49:31 +01:00
Maciej Małecki
1f73f8a42d Depend on next branch 2014-03-17 16:48:07 +01:00