aboutsummaryrefslogtreecommitdiffstats
path: root/lib/invoices.ts
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2024-09-24 12:30:51 -0700
committerAdam Soltys <[email protected]>2024-09-24 12:30:51 -0700
commit80365c227c5a774ad65f5dad8b989e1966630160 (patch)
treea9d6cd130e48e815fb60b91263c5d9b5a83b8808 /lib/invoices.ts
parent8c8c71d54d23960ffc4caa94619bae7c6a69514b (diff)
downloadcoinos-server-80365c227c5a774ad65f5dad8b989e1966630160.tar.gz
coinos-server-80365c227c5a774ad65f5dad8b989e1966630160.zip
reconcile onchain balance
Diffstat (limited to 'lib/invoices.ts')
-rw-r--r--lib/invoices.ts5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/invoices.ts b/lib/invoices.ts
index 60bcba0f..d7f09de5 100644
--- a/lib/invoices.ts
+++ b/lib/invoices.ts
@@ -51,13 +51,15 @@ export let generate = async ({ invoice, user }) => {
let id = v4();
- let hash, text;
+ let hash, text, path;
if (account.seed) {
type = "bitcoin";
let node = rpc({ ...config[type], wallet: aid });
hash = await node.getNewAddress();
text = bip21(hash, invoice);
+
+ ({ hdkeypath: path } = await node.getAddressInfo(hash));
} else if (type === types.lightning) {
let r;
if (bolt11) {
@@ -107,6 +109,7 @@ export let generate = async ({ invoice, user }) => {
received: 0,
request_id,
memoPrompt,
+ path,
prompt,
secret,
text,