aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/payments.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/payments.js b/lib/payments.js
index fb7d9cc6..dba7f4d0 100644
--- a/lib/payments.js
+++ b/lib/payments.js
@@ -181,6 +181,8 @@ export let credit = async (hash, amount, memo, ref, type = types.internal) => {
parseFloat(((amount * p.rate) / 100000000).toFixed(2))
);
+ l(words);
+
const client = mqtt.connect('mqtt://ln.coinos.io', config.mqtt);
const raw = `/app/data/uploads/${p.id}-raw.mp3`;
const out = `/app/data/uploads/${p.id}.mp3`;
@@ -191,11 +193,8 @@ export let credit = async (hash, amount, memo, ref, type = types.internal) => {
.audioBitrate(128)
.audioFrequency(44100)
.toFormat('mp3')
- .on('data', (chunk) => {
- client.publish("mp3", chunk);
- })
.on('end', () => {
- console.log('File has been re-encoded successfully.');
+ client.publish(username, "done");
})
.on('error', (err) => {
console.error('Error:', err);