diff options
| author | Adam Soltys <[email protected]> | 2020-07-17 20:55:47 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2020-07-17 20:55:59 -0700 |
| commit | 1962a6dcf1bb37bb8beb3fc4c0231d5a504a75fe (patch) | |
| tree | 46ffa53e3f7ebbdb2ea9c9abd1cf64405e1410cd /routes/bitcoin | |
| parent | 4a8abaa2722b629cebebb677249c3fd4f51292fb (diff) | |
| download | coinos-server-1962a6dcf1bb37bb8beb3fc4c0231d5a504a75fe.tar.gz coinos-server-1962a6dcf1bb37bb8beb3fc4c0231d5a504a75fe.zip | |
memos
Diffstat (limited to 'routes/bitcoin')
| -rw-r--r-- | routes/bitcoin/receive.js | 2 | ||||
| -rw-r--r-- | routes/bitcoin/send.js | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/routes/bitcoin/receive.js b/routes/bitcoin/receive.js index 131166bc..f4fd4294 100644 --- a/routes/bitcoin/receive.js +++ b/routes/bitcoin/receive.js @@ -55,6 +55,7 @@ zmqRawTx.on("message", async (topic, message, sequence) => { const currency = invoice ? invoice.currency : user.currency; const rate = invoice ? invoice.rate : app.get("rates")[user.currency]; const tip = invoice ? invoice.tip : 0; + const memo = invoice ? invoice.memo : ''; let confirmed = false; @@ -92,6 +93,7 @@ zmqRawTx.on("message", async (topic, message, sequence) => { user_id: user.id, hash, fee, + memo, amount: value - tip, currency, rate, diff --git a/routes/bitcoin/send.js b/routes/bitcoin/send.js index 2ab28054..fcdcb298 100644 --- a/routes/bitcoin/send.js +++ b/routes/bitcoin/send.js @@ -3,7 +3,7 @@ const reverse = require("buffer-reverse"); module.exports = async (req, res) => { let { user } = req; - let { address, tx } = req.body; + let { address, memo, tx } = req.body; let { hex } = tx; let fee = toSats(tx.fee); @@ -56,6 +56,7 @@ module.exports = async (req, res) => { params = { amount: -total, fee, + memo, account_id: account.id, user_id: user.id, rate: app.get("rates")[user.currency], |
