handle application uris in invoices

This commit is contained in:
keyan 2023-05-07 10:02:59 -05:00
parent 2ee780ec7a
commit 3465eb7aba
1 changed files with 4 additions and 0 deletions

View File

@ -301,6 +301,10 @@ export default {
async function createWithdrawal (parent, { invoice, maxFee }, { me, models, lnd }) {
await ssValidate(withdrawlSchema, { invoice, maxFee })
// remove 'lightning:' prefix if present
invoice = invoice.replace(/^lightning:/, '')
// decode invoice to get amount
let decoded
try {