diff options
| -rw-r--r-- | routes/invoices.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/routes/invoices.js b/routes/invoices.js index 7c11bac3..bdb889a2 100644 --- a/routes/invoices.js +++ b/routes/invoices.js @@ -67,11 +67,6 @@ app.post("/invoice", optionalAuth, async (req, res, next) => { if (tip > amount || tip > 1000000 || tip < 0) throw new Error("tip amount out of range"); - if (liquidAddress) { - l("conversion request for", liquidAddress, text); - store.convert[text] = { address: liquidAddress, tx }; - } - if (!user) ({ user } = req); else { user = await db.User.findOne({ @@ -125,6 +120,11 @@ app.post("/invoice", optionalAuth, async (req, res, next) => { invoice.text = bip21(invoice, user.account); } + if (liquidAddress) { + l("conversion request for", liquidAddress, text); + store.convert[text] = { address: liquidAddress, tx }; + } + l( "creating invoice", user.username, |
