diff options
| author | Adam Soltys <[email protected]> | 2018-11-25 23:29:33 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2018-11-25 23:29:40 -0800 |
| commit | 18b641e590a7908dee4b3667a9196dbda484e477 (patch) | |
| tree | 7418d7842e22cbe4f61b1231b2392dff8b3e6ff0 | |
| parent | b9494868907e0b392a7be2ae25725c373fe8d943 (diff) | |
| download | coinos-server-18b641e590a7908dee4b3667a9196dbda484e477.tar.gz coinos-server-18b641e590a7908dee4b3667a9196dbda484e477.zip | |
record ask rate when payment received
| -rw-r--r-- | index.js | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -99,6 +99,8 @@ const l = console.log payment.received = true payment.user.channelbalance += parseInt(msg.value) + payment.rate = app.get('rates').ask + console.log(payment.rate) await payment.save() await payment.user.save() @@ -332,7 +334,7 @@ const l = console.log amount: -total, user_id: req.user.id, hash, - rate: app.get('rates').bid, + rate: app.get('rates').ask, currency: 'CAD', }) @@ -384,7 +386,7 @@ const l = console.log amount: -total, user_id: req.user.id, hash: txid, - rate: app.get('rates').bid, + rate: app.get('rates').ask, currency: 'CAD', }) |
