diff options
| author | Adam Soltys <[email protected]> | 2026-02-28 19:26:24 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-02-28 19:26:24 -0800 |
| commit | 36ae7b0cfc66aa614287f96ac2be85ff183130a2 (patch) | |
| tree | 22123b31d177505b0b6b8fada34a86c42aed8ef2 /src | |
| parent | 41467c51e2def5c8932e1dd967f3cfe04e0cc563 (diff) | |
| download | coinos-ui-36ae7b0cfc66aa614287f96ac2be85ff183130a2.tar.gz coinos-ui-36ae7b0cfc66aa614287f96ac2be85ff183130a2.zip | |
use post endpoint
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/ark.ts | 4 | ||||
| -rw-r--r-- | src/routes/(app)/account/[id]/+page.svelte | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/ark.ts b/src/lib/ark.ts index c5212f70..75609381 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("/post/ark/sync", { transactions, aid, balance }); + const result = await post("/post/ark/sync", { transactions, aid, balance, arkAddress: walletAddr }); cacheVaultSnapshot(); // fire-and-forget return result; }; @@ -364,7 +364,7 @@ export const sendArk = async (address: string, amount: number) => { const freshBalance = await wallet.getBalance(); const preSendTotal = (freshBalance.available || 0) + (freshBalance.preconfirmed || 0); if (freshBalance.available < amount) { - throw new Error(`Insufficient funds: ${freshBalance.available} available, need ${amount}\nLocked balance: ${freshBalance.boarding || 0} boarding, ${freshBalance.preconfirmed || 0} preconfirmed, ${freshBalance.recoverable || 0} recoverable`); + throw new Error(`Insufficient funds: ${freshBalance.available} available, need ${amount}\nLocked balance: ${freshBalance.boarding?.total || 0} boarding, ${freshBalance.preconfirmed || 0} preconfirmed, ${freshBalance.recoverable || 0} recoverable`); } let txid; diff --git a/src/routes/(app)/account/[id]/+page.svelte b/src/routes/(app)/account/[id]/+page.svelte index cae3d030..6a83b153 100644 --- a/src/routes/(app)/account/[id]/+page.svelte +++ b/src/routes/(app)/account/[id]/+page.svelte @@ -126,7 +126,7 @@ let del = async () => { try { - await post("/api/account/delete", { id }); + await post("/post/account/delete", { id }); goto(`/${user.username}`); } catch (e: any) { fail(e.message); |
