diff options
| author | Adam Soltys <[email protected]> | 2024-09-24 12:30:51 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2024-09-24 12:30:51 -0700 |
| commit | 80365c227c5a774ad65f5dad8b989e1966630160 (patch) | |
| tree | a9d6cd130e48e815fb60b91263c5d9b5a83b8808 /lib/invoices.ts | |
| parent | 8c8c71d54d23960ffc4caa94619bae7c6a69514b (diff) | |
| download | coinos-server-80365c227c5a774ad65f5dad8b989e1966630160.tar.gz coinos-server-80365c227c5a774ad65f5dad8b989e1966630160.zip | |
reconcile onchain balance
Diffstat (limited to 'lib/invoices.ts')
| -rw-r--r-- | lib/invoices.ts | 5 |
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, |
