aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-02-27 16:17:57 -0800
committerAdam Soltys <[email protected]>2026-02-27 16:17:57 -0800
commit6efa1762d7d7583a5cf191474e80252deff0df85 (patch)
tree00c5f20189956874283b79e429a84edf23297319 /src
parent0a1981a48832e4cf8822a523474f67f9dfb2f27f (diff)
downloadcoinos-ui-6efa1762d7d7583a5cf191474e80252deff0df85.tar.gz
coinos-ui-6efa1762d7d7583a5cf191474e80252deff0df85.zip
remove ark logs
Diffstat (limited to 'src')
-rw-r--r--src/lib/ark.ts10
-rw-r--r--src/routes/(app)/+layout.svelte5
2 files changed, 0 insertions, 15 deletions
diff --git a/src/lib/ark.ts b/src/lib/ark.ts
index 15d96e3a..2f1595a1 100644
--- a/src/lib/ark.ts
+++ b/src/lib/ark.ts
@@ -70,7 +70,6 @@ export const subscribeToAsp = (onEvent: () => void) => {
es.onmessage = (event) => {
try {
const data = JSON.parse(event.data);
- console.log("[ark] SSE event:", data);
if (data.event?.newVtxos?.length > 0 || data.event?.spentVtxos?.length > 0) {
onEvent();
}
@@ -85,7 +84,6 @@ export const subscribeToAsp = (onEvent: () => void) => {
// will detect CLOSED state and fully re-subscribe.
};
- console.log("[ark] SSE subscribed", subId);
};
connect().catch((e) => {
@@ -136,13 +134,11 @@ const _syncTransactions = async (aid: string) => {
if (!wallet) return;
const walletAddr = await wallet.getAddress();
- console.log("arkSync: wallet address", walletAddr);
const transactions: any[] = [];
const history = await wallet.getTransactionHistory();
const historyTxids = new Set<string>();
- console.log("arkSync: history", history.length, history);
for (const tx of history) {
if (tx.key.arkTxid) historyTxids.add(tx.key.arkTxid);
@@ -158,7 +154,6 @@ const _syncTransactions = async (aid: string) => {
// Include preconfirmed VTXOs not yet in transaction history
const vtxos = await wallet.getVtxos({ spendableOnly: false });
- console.log("arkSync: vtxos", vtxos.length, vtxos);
for (const v of vtxos) {
if (v.virtualStatus?.state !== "preconfirmed") continue;
const id = v.arkTxId || v.txid;
@@ -229,7 +224,6 @@ export const sendArk = async (address: string, amount: number) => {
// Refresh expired VTXOs before attempting to send
const balance = await wallet.getBalance();
if (balance.available < amount && balance.recoverable > 0) {
- console.log("ark send: refreshing expired VTXOs before send");
await refresh();
}
@@ -248,7 +242,6 @@ export const sendArk = async (address: string, amount: number) => {
e?.message?.includes("VTXO_ALREADY_REGISTERED") ||
e?.message?.includes("VTXO_ALREADY_SPENT")
) {
- console.log("ark send: stale VTXOs, recreating wallet and retrying");
walletInstance = undefined;
walletKey = undefined;
sendWallet = await getWallet();
@@ -324,20 +317,17 @@ export const refresh = async () => {
const { VtxoManager } = await loadArkSdk();
const balance = await wallet.getBalance();
- console.log("ark refresh: balance", balance);
const manager = new VtxoManager(wallet);
let acted = false;
if (balance.recoverable > 0) {
- console.log("ark refresh: recovering", balance.recoverable, "swept sats");
await manager.recoverVtxos();
acted = true;
}
const expiring = await manager.getExpiringVtxos();
if (expiring.length > 0) {
- console.log("ark refresh: renewing", expiring.length, "expiring vtxos");
await manager.renewVtxos();
acted = true;
}
diff --git a/src/routes/(app)/+layout.svelte b/src/routes/(app)/+layout.svelte
index 3fc8f9cf..500880e8 100644
--- a/src/routes/(app)/+layout.svelte
+++ b/src/routes/(app)/+layout.svelte
@@ -58,17 +58,13 @@
let arkSync = async (source = "unknown") => {
if (arkSyncing || arkSending) {
- console.log(`[arkSync] SKIPPED (source: ${source}, syncing: ${arkSyncing}, sending: ${arkSending})`);
return;
}
- console.log(`[arkSync] START (source: ${source})`);
arkSyncing = true;
try {
const aid = $arkaid || getCookie("aid") || user.id;
const result = await syncTransactions(aid);
- console.log(`[arkSync] DONE (source: ${source}, received: ${result?.received || 0})`);
-
if (result?.forward && !arkForwarding) {
arkForwarding = true;
try {
@@ -121,7 +117,6 @@
await new Promise((r) => setTimeout(r, delay));
const aid = $arkaid || getCookie("aid") || user.id;
const result = await syncTransactions(aid);
- console.log(`[arkSync] SSE retry (delay: ${delay}ms, received: ${result?.received || 0})`);
if (result?.received > 0) {
const paidPayment = result.payments?.find((p: any) => p.iid && p.amount > 0);
if (paidPayment) {