aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-03-04 09:23:03 -0800
committerAdam Soltys <[email protected]>2026-03-04 09:23:03 -0800
commitba579c4f801be258128294e7cb1f4d2e518e37ca (patch)
tree2ffbee38d5d82d06580a68ffddd798c1930d6ded /src/lib
parente39b182ac4c2134157eca3f4cc7c8c7dfd389484 (diff)
downloadcoinos-ui-ba579c4f801be258128294e7cb1f4d2e518e37ca.tar.gz
coinos-ui-ba579c4f801be258128294e7cb1f4d2e518e37ca.zip
fix api calls
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/ark.ts8
-rw-r--r--src/lib/bitcoinSync.ts2
-rw-r--r--src/lib/keyWrapping.ts2
-rw-r--r--src/lib/nostr.ts2
-rw-r--r--src/lib/utils.ts2
5 files changed, 8 insertions, 8 deletions
diff --git a/src/lib/ark.ts b/src/lib/ark.ts
index e223d013..dac5cb2a 100644
--- a/src/lib/ark.ts
+++ b/src/lib/ark.ts
@@ -303,7 +303,7 @@ const _syncTransactions = async (aid: string) => {
const bal = await wallet.getBalance();
const balance = (bal.available || 0) + (bal.preconfirmed || 0);
- const result = await post("/api/ark/sync", { transactions, aid, balance, arkAddress: walletAddr });
+ const result = await post("/ark/sync", { transactions, aid, balance, arkAddress: walletAddr });
cacheVaultSnapshot(); // fire-and-forget
return result;
};
@@ -456,14 +456,14 @@ export const sendArkViaForward = async ({
try {
const txid = await sendArk(serverArkAddress, amount);
- await post("/api/ark/vault-send", { hash: txid, amount, aid });
+ await post("/ark/vault-send", { hash: txid, amount, aid });
const invoice: any = { type: "ark", amount, aid };
if (forward) invoice.forward = forward;
- const inv = await post("/api/invoice", { invoice, user });
+ const inv = await post("/invoice", { invoice, user });
- return await post("/api/ark/receive", { amount, hash: txid, iid: inv.id });
+ return await post("/ark/receive", { amount, hash: txid, iid: inv.id });
} finally {
vaultForwarding = false;
}
diff --git a/src/lib/bitcoinSync.ts b/src/lib/bitcoinSync.ts
index 92d3382b..3b31d6c0 100644
--- a/src/lib/bitcoinSync.ts
+++ b/src/lib/bitcoinSync.ts
@@ -6,7 +6,7 @@ export const syncBitcoinVault = async (aid: string) => {
if (syncing) return;
syncing = true;
try {
- return await post("/api/bitcoin/sync", { aid });
+ return await post("/bitcoin/sync", { aid });
} finally {
syncing = false;
}
diff --git a/src/lib/keyWrapping.ts b/src/lib/keyWrapping.ts
index fb46f767..971b929c 100644
--- a/src/lib/keyWrapping.ts
+++ b/src/lib/keyWrapping.ts
@@ -45,7 +45,7 @@ export async function resolveCanonicalKey(
export async function saveEncryptedKeys(
encryptedKeys: Record<string, string>,
): Promise<void> {
- await post("/api/user", { encryptedKeys });
+ await post("/user", { encryptedKeys });
}
export function passwordMethodId(): string {
diff --git a/src/lib/nostr.ts b/src/lib/nostr.ts
index 4b7316e8..e91e33f5 100644
--- a/src/lib/nostr.ts
+++ b/src/lib/nostr.ts
@@ -136,7 +136,7 @@ export const sign = async (event: any, user?: any) => {
};
export const send = (event: EventTemplate) => {
- return post("/api/event", { event });
+ return post("/event", { event });
};
const getPassword = async (): Promise<string> => {
diff --git a/src/lib/utils.ts b/src/lib/utils.ts
index cb1e5ec7..74e05f17 100644
--- a/src/lib/utils.ts
+++ b/src/lib/utils.ts
@@ -14,7 +14,7 @@ export function scroll(section: any) {
setTimeout(() => section.scrollIntoView({ behavior: "smooth" }), 500);
}
-const base = browser ? "" : PUBLIC_COINOS_URL;
+const base = browser ? "/api" : PUBLIC_COINOS_URL;
let getIp: (() => string | undefined) | undefined;