aboutsummaryrefslogtreecommitdiffstats
path: root/lib/invoices.ts
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2024-09-13 23:18:20 -0700
committerAdam Soltys <[email protected]>2024-09-13 23:18:20 -0700
commitfb9b4cc39df1608aa1a04286408f03e244f8f15f (patch)
tree40fd6c4f4ba0a9b1237f90225be8f1c89cf4e49b /lib/invoices.ts
parent183315347b3ce6d4057abe05861c39f5d4b1aa46 (diff)
downloadcoinos-server-fb9b4cc39df1608aa1a04286408f03e244f8f15f.tar.gz
coinos-server-fb9b4cc39df1608aa1a04286408f03e244f8f15f.zip
add default account if missing
Diffstat (limited to 'lib/invoices.ts')
-rw-r--r--lib/invoices.ts4
1 files changed, 2 insertions, 2 deletions
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;