diff options
| author | Adam Soltys <[email protected]> | 2022-11-06 21:40:09 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2022-11-06 21:40:09 -0800 |
| commit | c2c183d5ac76813fd4f961baabb17ca7bb316926 (patch) | |
| tree | 38fcc6e714dec762450ecbe40d0725ee04b1ba7d | |
| parent | 80dc9d070e39479270f573ebd8a446c591a77172 (diff) | |
| download | coinos-server-c2c183d5ac76813fd4f961baabb17ca7bb316926.tar.gz coinos-server-c2c183d5ac76813fd4f961baabb17ca7bb316926.zip | |
send more invoice details
| -rw-r--r-- | lib/sockets.js | 2 | ||||
| -rw-r--r-- | routes/invoices.js | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/lib/sockets.js b/lib/sockets.js index fb007a17..30eb86f0 100644 --- a/lib/sockets.js +++ b/lib/sockets.js @@ -200,7 +200,7 @@ app.register(async function(app) { }); ws.on("close", function(code, reason) { - // if (reason) console.log("closing socket", reason.toString(), id); + // console.log("closing socket", reason && reason.toString(), id); try { const username = names[id]; if (store.sockets[username] && store.sockets[username][id]) { diff --git a/routes/invoices.js b/routes/invoices.js index 074aed61..ebe4e6d5 100644 --- a/routes/invoices.js +++ b/routes/invoices.js @@ -153,6 +153,9 @@ app.post("/invoice", optionalAuth, async (req, res, next) => { if (requester) { emit(requester, "invoice", { + amount: invoice.amount, + currency: invoice.currency, + rate: invoice.rate, uuid: invoice.uuid, user: { username: user.username, profile: user.profile } }); |
