aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-02-13 12:31:45 -0800
committerAdam Soltys <[email protected]>2026-02-13 12:31:45 -0800
commit6de76d3a76f8b91b0ffa88bf175bb821234e84bd (patch)
treef9c5b76f3fb0476692fe989ad0b521845ac5a339
parent3cb6698cb4b53127ec6b192b2df8bd70017be361 (diff)
downloadcoinos-server-6de76d3a76f8b91b0ffa88bf175bb821234e84bd.tar.gz
coinos-server-6de76d3a76f8b91b0ffa88bf175bb821234e84bd.zip
send pending balance
-rw-r--r--lib/invoices.ts2
-rw-r--r--routes/users.ts3
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/invoices.ts b/lib/invoices.ts
index 71f95b8c..e6b6e146 100644
--- a/lib/invoices.ts
+++ b/lib/invoices.ts
@@ -69,7 +69,7 @@ export const generate = async ({ invoice, user }) => {
if (account.type === "ark") {
type = PaymentType.ark;
text = account.arkAddress;
- } else if (account.seed) {
+ } else if (account.seed || (account.pubkey && account.fingerprint)) {
type = PaymentType.bitcoin;
const nextIndex = account.nextIndex || 0;
const { address, path: hdpath } = deriveAddress(account.pubkey, account.fingerprint, nextIndex);
diff --git a/routes/users.ts b/routes/users.ts
index a665de73..89920748 100644
--- a/routes/users.ts
+++ b/routes/users.ts
@@ -23,7 +23,7 @@ import { authenticator } from "otplib";
import { v4 } from "uuid";
import { PaymentType } from "$lib/types";
-import { createBalanceAccount, getBalance, getCredit } from "$lib/tb";
+import { createBalanceAccount, getBalance, getCredit, getPending } from "$lib/tb";
import { importAccountHistory } from "$lib/payments";
import type { ProfilePointer } from "nostr-tools/nip19";
@@ -839,6 +839,7 @@ export default {
await importAccountHistory(account);
}
account.balance = await getBalance(id);
+ account.pending = await getPending(id);
accounts.push(account);
}