diff options
| author | Adam Soltys <[email protected]> | 2026-03-03 21:40:35 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-03-03 21:40:35 -0800 |
| commit | e66a08d18f2bef2eccfe84042a2674141a73d1c2 (patch) | |
| tree | 171389b57782b7ff2abb570ac69f130f0705ecf5 /src/lib | |
| parent | 632358158c76ceaee5db2b1879487c136289766e (diff) | |
| download | coinos-ui-e66a08d18f2bef2eccfe84042a2674141a73d1c2.tar.gz coinos-ui-e66a08d18f2bef2eccfe84042a2674141a73d1c2.zip | |
bitcoin sync routine
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/bitcoinSync.ts | 13 |
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; + } +}; |
