From 348a57004f94dd0f58c4e70769e65ca7ea3f7619 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Sat, 1 Aug 2026 19:38:30 -0700 Subject: Simplify: one Lightning path, one balance, fewer features MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Dropped: silent payments (feature, wallet chains, scan worker, indexer config), Boltz submarine/reverse swaps (feature + swap.js + tools), the third-party ark swap bridge (config, client flows, settings card — the ASP's own Lightning send is the one path now), and the Consolidate coins settings action. The NWC pouch is gone with them: background answering now spends the WHOLE ark balance. The IndexedDB record mirrors the real manager state plus the chain-3 keys for its live coins and a change-index window; the worker pays through the ASP exactly like the open app, and the app folds the worker's spends, change, and key allocations back in on connect (additive merge + reconcile against the server). A leftover chain-6 pouch from the short-lived pouch era is swept home automatically using the keys stored in its own record. The stated tradeoff: same-origin script access now reaches the ark balance, not a carve-out — the ark balance is walking-around money, the on-chain wallet's keys are never mirrored, and per-connection NWC budgets remain the enforced ceiling. Bundle: 726KB -> 602KB. Co-Authored-By: Claude Fable 5 --- src/app.js | 29 +---------------------------- 1 file changed, 1 insertion(+), 28 deletions(-) (limited to 'src/app.js') diff --git a/src/app.js b/src/app.js index 8eda874..d5f277b 100644 --- a/src/app.js +++ b/src/app.js @@ -82,7 +82,6 @@ const ui = { giftDmStatus: null, // 'sending' | 'sent' | 'failed' — nostr DM of the claim code claimLocked: null, // a locked gift being opened: { v, amount, to, ct } claimCodeInput: '', // the claim code the recipient pastes from their nostr DM - consolidateError: null, // error from a coin-consolidation attempt viewGift: null, // re-viewing a previously created gift's link/QR { code, locked, amount, claimCode } claimChoose: null, // opening a gift with existing wallets present: { code } — pick a target giftCode: null, // last-created gift PSBT code @@ -1476,38 +1475,12 @@ function settingsTab() { ), networkCard(), ...featureAll('settingsCards'), - consolidateCard(), explorerCard(), null ); } -// Merge many small coins into one. Useful after lots of small receives/gifts — -// keeps future sends/gifts to a single input (cheaper, smaller gift QR). -function consolidateCard() { - if (wallet.watchOnly) return null; - const n = wallet.spendableCoinCount ? wallet.spendableCoinCount() : 0; - if (n < 2) return null; - return h('div', { class: 'card col' }, - h('h3', {}, t('consolidateTitle')), - h('p', { class: 'small muted', style: 'margin:0' }, t('consolidateDesc', { n })), - ui.consolidateError && h('div', { class: 'notice err' }, ui.consolidateError), - h('button', { class: 'btn-block', disabled: ui.busy || wallet.offline, onClick: doConsolidate }, ui.busy ? h('span', { class: 'spinner' }) : t('consolidateAction', { n }))); -} -async function doConsolidate() { - if (wallet.offline) { ui.consolidateError = t('scanOffline'); render(); return; } - ui.busy = true; ui.consolidateError = ''; render(); - try { - const rate = (wallet.feeRates && wallet.feeRates.halfHourFee) || 5; - await wallet.consolidate(rate); - toast(t('consolidateDone')); - wallet.scan().catch(() => {}); - } catch (e) { - ui.consolidateError = e.message || t('consolidateFailed'); - } - ui.busy = false; - render(); -} + -- cgit v1.2.3