aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--routes/assets.js11
-rw-r--r--routes/bitcoin/receive.js4
-rw-r--r--routes/lightning/receive.js2
-rw-r--r--routes/liquid/receive.js2
4 files changed, 14 insertions, 5 deletions
diff --git a/routes/assets.js b/routes/assets.js
index fe667dd9..939eb76c 100644
--- a/routes/assets.js
+++ b/routes/assets.js
@@ -111,7 +111,15 @@ app.post(
if (filename) contract.filename = filename;
- l.info("attempting issuance", req.user.username, contract, "address", address, "pubkey", pubkey);
+ l.info(
+ "attempting issuance",
+ req.user.username,
+ contract,
+ "address",
+ address,
+ "pubkey",
+ pubkey
+ );
sha256.update(JSON.stringify(contract));
const hash = sha256.digest("hex");
@@ -128,6 +136,7 @@ app.post(
contract_hash
};
+
params.asset_amount = asset_amount / (SATS / 10 ** precision);
if (token_amount) {
diff --git a/routes/bitcoin/receive.js b/routes/bitcoin/receive.js
index d782627d..67ccdb45 100644
--- a/routes/bitcoin/receive.js
+++ b/routes/bitcoin/receive.js
@@ -114,7 +114,7 @@ zmqRawTx.on("message", async (topic, message, sequence) => {
emit(user.username, "payment", payment);
l.info("bitcoin detected", user.username, value);
notify(user, `${value} SAT payment detected`);
- await callWebhook(invoice, payment);
+ callWebhook(invoice, payment);
}
} catch (e) {
console.log(e);
@@ -189,7 +189,7 @@ setInterval(async () => {
emit(user.username, "payment", p);
l.info("bitcoin confirmed", user.username, p.amount, p.tip);
notify(user, `${total} SAT payment confirmed`);
- await callWebhook(p.invoice, p);
+ callWebhook(p.invoice, p);
} else {
l.warn("couldn't find bitcoin payment", hash);
}
diff --git a/routes/lightning/receive.js b/routes/lightning/receive.js
index 32c54de6..0e98cd93 100644
--- a/routes/lightning/receive.js
+++ b/routes/lightning/receive.js
@@ -69,7 +69,7 @@ const handlePayment = async msg => {
payment = payment.get({ plain: true });
payment.account = account.get({ plain: true });
- await callWebhook(invoice, payment);
+ callWebhook(invoice, payment);
emit(user.username, "payment", payment);
emit(user.username, "account", payment.account);
diff --git a/routes/liquid/receive.js b/routes/liquid/receive.js
index c377a6b5..3a6aab10 100644
--- a/routes/liquid/receive.js
+++ b/routes/liquid/receive.js
@@ -175,7 +175,7 @@ zmqRawTx.on("message", async (topic, message, sequence) => {
emit(user.username, "account", payment.account);
l.info("liquid detected", address, user.username, asset, value);
notify(user, `${value} SAT payment detected`);
- await callWebhook(invoice, payment);
+ callWebhook(invoice, payment);
});
}
} catch (e) {