From fb9b4cc39df1608aa1a04286408f03e244f8f15f Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Fri, 13 Sep 2024 23:18:20 -0700 Subject: add default account if missing --- lib/invoices.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/invoices.ts') diff --git a/lib/invoices.ts b/lib/invoices.ts index c18a120b..45c97fe2 100644 --- a/lib/invoices.ts +++ b/lib/invoices.ts @@ -53,8 +53,8 @@ export let generate = async ({ invoice, user, sender = undefined }) => { let hash, text; if (account) { - bc = rpc({ ...config.bitcoin, wallet: account }); - hash = await bc.getNewAddress(); + let node = rpc({ ...config.bitcoin, wallet: account }); + hash = await node.getNewAddress(); text = bip21(hash, invoice); } else if (type === types.lightning) { let r; -- cgit v1.2.3