aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
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;
+ }
+};