aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-03-03 21:40:35 -0800
committerAdam Soltys <[email protected]>2026-03-03 21:40:35 -0800
commite66a08d18f2bef2eccfe84042a2674141a73d1c2 (patch)
tree171389b57782b7ff2abb570ac69f130f0705ecf5 /src/lib
parent632358158c76ceaee5db2b1879487c136289766e (diff)
downloadcoinos-ui-e66a08d18f2bef2eccfe84042a2674141a73d1c2.tar.gz
coinos-ui-e66a08d18f2bef2eccfe84042a2674141a73d1c2.zip
bitcoin sync routine
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/bitcoinSync.ts13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/lib/bitcoinSync.ts b/src/lib/bitcoinSync.ts
new file mode 100644
index 00000000..9061e2fc
--- /dev/null
+++ b/src/lib/bitcoinSync.ts
@@ -0,0 +1,13 @@
+import { post } from "$lib/utils";
+
+let syncing = false;
+
+export const syncBitcoinVault = async (aid: string) => {
+ if (syncing) return;
+ syncing = true;
+ try {
+ return await post("/post/bitcoin/sync", { aid });
+ } finally {
+ syncing = false;
+ }
+};