Commit graph

749 commits

Author SHA1 Message Date
Rafael Taranto
b885e5698c Merge branch 'release' into merge-release-into-dev 2018-12-27 15:01:10 -03:00
Davit Abulashvili
b254f7f2be Support itbit exchange/ticker. Additions (#232)
* Initial itBit implementation

* Add tests for calculatePrice in exchange/itbit.js

* Add etherium to supported crypto codes in common/itbit.js

* Apply standardjs to itbit files

* itbit trade test. not important

* test getCurrencyRates in ticker/itbit.js
2018-12-11 11:47:34 +02:00
Neal Conner
b9f9c6facc Caution against mock-ticker use 2018-12-10 11:19:14 +02:00
Neal Conner
16a4239b86 Update ZEC, BCH, ETH node versions 2018-12-10 11:18:24 +02:00
Josh Harvey
8e1f9e0b83 Merge pull request #223 from RafaelTaranto/bitgo-api-v2
Bitgo api v2
2018-12-10 00:39:45 +02:00
Rafael Taranto
f674f64f58 Use spendable amount for balance 2018-12-03 13:18:58 -02:00
Fabio Cigliano
cdfc84a96a migrate-options unit test added 2018-11-28 22:24:48 +02:00
Davit Abulashvili
907cd08cf1 Log unsuccessful trade attempts in the db (#224)
* Save trade error in table trades

* Add one migration, Add error column to trades table

* changes in plugins.js file

* Apply standardjs to plugins.js file
2018-11-28 20:24:48 +02:00
Fabio Cigliano
dc1ed52357 lamassu-migrate-config to update ls basepath (#216)
* lamassu-migrate-config to update ls basepath

* documentation added

* constrain to a particular set of options
2018-11-22 17:04:41 +01:00
Rafael Taranto
fa652b8e74 Fix standard styling issues 2018-11-21 11:37:26 -02:00
Rafael Taranto
01153d0562 Migrate bitgo api to v2 2018-11-21 11:36:02 -02:00
Zoran Joka
13040f41a1 Optimize machine pings query (#222)
* refactor recordPing method

* optimize queries

* migrate machine_pings

remove id, serial_number
add primary key on device_id
add unique constraint on device_id

* remove filelds from query, rename migration, delete duplicate migration

* truncate machine_pings in migration
2018-11-21 11:08:19 +01:00
Rafael Taranto
06f8c57608 Save migrations file on db (#215)
* Revert "Migration sql changes (#199)"

This reverts commit 12c834469c.

* Save migrate file on db

* Add message on migration error in lamassu-update
2018-11-18 10:15:22 +01:00
Rafael Taranto
eb033a4174 Increase time to consider machine stuck (#211)
* Increase time to consider machine stuck

* Fix standard styling issues
2018-11-15 14:20:26 +01:00
Zoran Joka
599c865f37 Filter only mock options when in dev mode (#206)
* Filter only mock options when in dev mode

* Filter only in production mode

* Refactor filter to separate function, add unit tests

* Check for mock codes in test
2018-11-08 09:24:09 +01:00
Rafael Taranto
d97a33565f Change seed file with a bip39 mnemonic (#207)
* Change seed file with a bip39 mnemonic

* Create helper for bip39 mnemonic

* Prod mode on lamassu-update-to-mnemonic script

* Fix standard styling issues
2018-11-07 18:28:40 +01:00
Rafael Taranto
809bf5a2a9 Add sms/email notifications on transactions (#198)
* Add sms/email notifications on transactions

* Add configuration for transaction notification

* Add notification on provision address error

* Remove unneeded noop from promises
2018-11-06 13:49:12 +01:00
Zoran Joka
272127518d Update last_online device field on each machine ping (#203)
* update last_online device field on each machine ping

* change var name to camel-case

* Use pgp name parameters instead of interpolation
2018-11-04 19:14:27 +01:00
Rafael Taranto
65e2bf6a63 Change HKDF return type from string to arrayBuffer (#204) 2018-11-02 21:29:55 +02:00
Rafael Taranto
bd75194526 Fix exception on clock skew (#202)
* Fix exception on clock skew

* Return device name instead of db object
2018-11-01 23:07:47 +02:00
Rafael Taranto
65ce8aee3d Fix logger clutter message (#201)
* Fix logger message handling

* Fix standard styling issues
2018-10-31 17:25:59 +02:00
Rafael Taranto
de8a380bd8 Remove clutter from logger (#196)
* Remove clutter from the logger

Prior to this commit the logger was stringfying even functions.
Because of this response errors from axios was dumping a log of info on
the logs.

* Fixing standard style issues

* Check for toString on meta
2018-10-30 08:48:16 +02:00
Rafael Taranto
b47af59a7f Improve transaction errors (#194)
* Improve transaction errors

* Fix standard styling errors
2018-10-27 15:22:36 +03:00
Rafael Taranto
3cffbedd9a Increase ticker memoized interval (#195)
* Increased ticker memoized interval

* Fix standard styling issues
2018-10-27 01:30:33 +03:00
Rafael Taranto
57c029a821 Change size of operatorId (#190)
Server was expecting 32 characters and the code was generating 64.
2018-10-22 22:29:24 +03:00
pedromiguelmiranda
4e3ed57cf8 Fix coinATMRadar behaviour when null cash out value is received (#187)
* Fix behaviour when null cash out value is received

* refactor: use loadash invoke method
2018-10-15 22:51:54 +03:00
Neal Conner
2e6157e97b Expand customer results (#186) 2018-10-13 17:17:56 +02:00
pedromiguelmiranda
7a07412a70 Identify machine name on logging upon clock skew error (#188) 2018-10-13 17:12:12 +02:00
Zoran Joka
85295ea62c Ensure etags.json can update when empty (#182)
* Ensure etags.json can update when empty

* Update and load etags on settings change

* Handle exception in catch block
2018-10-10 10:55:11 +02:00
Rafael Taranto
5ee7e40872 Add operator id on CoinATMRadar request (#184)
* Add operator id on CoinATMRadar request

* Update coinatmradar.js
2018-10-08 19:11:28 +02:00
Neal Conner
2fd4cd50c5 Prune Dash (#183) 2018-10-06 13:46:41 +02:00
Rafael Taranto
3b14a715b4 Replace mailjet with mailgun (#180) 2018-10-04 21:40:50 +03:00
pedromiguelmiranda
6a2e3bc348 Drop Geth installation upon coins installation (#181)
* drop geth installation

* code refactoring
2018-10-04 21:37:08 +03:00
pedromiguelmiranda
50e78078e3 7.3 crafty chhnemu | https://trello.com/c/3fMfHclE (#179)
* Added default ETH(infura)

* Code changes regarding review on PR 179 (https://github.com/lamassu/lamassu-server/pull/179)

*  Code changes regarding review on PR 179 (#179)
2018-10-03 17:11:19 +03:00
Rafael Taranto
bcf336741e Add QuadrigaCX exchange and ticker (#176)
* Add QuadrigaCX exchange and ticker

* Clean up code from QuadrigaCX
2018-09-27 21:59:53 +03:00
Fabio Cigliano
147db125dd reworking l-s startup (#175)
* reworking l-s startup

it was failing to retry when starting with an invalid configuration

* changed startup routine

* start supervisor after update
2018-09-27 13:49:11 +03:00
Rafael Taranto
de4a675a43 Fixed bitstamp coin scaling (#167)
The coin scaling for the bistamp excahnge was using a satoshi scaling for ETH when it should have been using wei.
2018-09-22 23:38:31 +01:00
Rafael Taranto
38aa006ecc Add device_id to cash_out_actions table (#164)
If a costumer originates a cashOut transaction at one device, and then
redeemed at a different device, the wrong machine would have bills debited from it.

With device_id being saved at the cash_out_actions table the bills can
be properly reconciled.
2018-09-22 23:38:31 +01:00
Rafael Taranto
1a8ef31d39 Add db error consts file (#165)
* Add db error consts file

* Fixed typo in comment
2018-09-22 23:38:31 +01:00
Rafael Taranto
f43149dca7 Improve serialization error handling on cash_out (#163)
Made API calls return 204 on serialization error.

When network is unreliable there is a high chance of generating a
serialization exception. By returnig 204 on them the lamassu-machine can
just continue working as if nothing happened.
2018-09-22 23:38:31 +01:00
Rafael Taranto
4e287d1ecb Improve cash out monitor transaction handling (#159)
Made the queries from 'monitorLiveIncoming' and 'monitorStaleIncoming'
return mutually exclusive records from the db.

Both this methods are polled and perform the same actions on the
records. As a result, transaction erros were prone to happen.
2018-09-22 23:36:02 +01:00
Fabio Cigliano
fe72eb8e7f show id card photo image on customer page (#155) 2018-09-22 23:36:02 +01:00
Fabio Cigliano
c559a998aa minor fixes 2018-09-22 23:36:02 +01:00
Fabio Cigliano
afc78d512e handle idCardPhoto image upload 2018-09-22 23:36:02 +01:00
Fabio Cigliano
9fc79f1bb4 OFAC flow fix (#137)
* 7.0.1

* OFAC flow fix
2018-09-22 23:36:02 +01:00
Fabio Cigliano
f32acdfe6c layer2 default fix (#156)
* layer2 default fix

* Don't log error message

Would pollute log too much.
2018-09-22 18:57:38 +01:00
Neal Conner
b170d35548 Patch bitcoind-inhereted network vulnerability (#168)
Updates BTC, BCH, LTC, DASH for vulnerability.

Updates ETH to latest.
2018-09-22 18:56:10 +01:00
Fabio Cigliano
9b7972017d changes cherry picked from dev to stable (#169)
* lamassu-update to update crontab

* lamassu update and install script to point to #stable branch

* lamassu update and install script to point to #stable branch

* removing outdated & unused script

* crontab update fix + npm rebuild path fix
2018-09-22 18:45:38 +01:00
Fabio Cigliano
f90357804a Dispense error status code fix (#142)
* 7.0.1

* add cash_out_txs.error_code to updateable fields
2018-08-24 17:30:25 +03:00
Neal Conner
dfb64b8e6b Wallet version updates (#152)
* Update ZEC, ETH, BTC, DASH

* Remove ZEC disabledeprecate

-disabledeprecate flag was removed in zcashd v1.1.2

* Update BCH

Compatible with November hard fork
2018-08-24 17:30:25 +03:00