From 20c3e58f926fd85010764c37931cbaa7367289c2 Mon Sep 17 00:00:00 2001 From: Riccardo Balbo Date: Wed, 18 Dec 2024 14:10:31 +0100 Subject: [PATCH] rebase --- wallets/bolt12/server.js | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/wallets/bolt12/server.js b/wallets/bolt12/server.js index bf945d303..1ce9c0d2e 100644 --- a/wallets/bolt12/server.js +++ b/wallets/bolt12/server.js @@ -1,4 +1,3 @@ -import { withTimeout } from '@/lib/time' import { fetchBolt12InvoiceFromOffer } from '@/lib/lndk' import { isBolt12Invoice } from '@/lib/bolt12' import { parseInvoice } from '@/lib/boltInvoices' @@ -6,14 +5,11 @@ import { toPositiveNumber } from '@/lib/format' export * from '@/wallets/bolt12' export async function testCreateInvoice ({ offer }, { lnd }) { - const timeout = 15_000 - return await withTimeout((async () => { - const invoice = await fetchBolt12InvoiceFromOffer({ lnd, offer, msats: 1000, description: 'test' }) - if (!isBolt12Invoice(invoice)) throw new Error('not a bolt12 invoice') - const parsedInvoice = await parseInvoice({ lnd, request: invoice }) - if (toPositiveNumber(parsedInvoice.mtokens) !== 1000) throw new Error('invalid invoice response') - return offer - })(), timeout) + const invoice = await fetchBolt12InvoiceFromOffer({ lnd, offer, msats: 1000, description: 'test' }) + if (!isBolt12Invoice(invoice)) throw new Error('not a bolt12 invoice') + const parsedInvoice = await parseInvoice({ lnd, request: invoice }) + if (toPositiveNumber(parsedInvoice.mtokens) !== 1000) throw new Error('invalid invoice response') + return offer } export async function createInvoice ({ msats, description, expiry }, { offer }, { lnd }) {