From ab1451d6b114b4ebbb9379a32d093346f462c768 Mon Sep 17 00:00:00 2001 From: Local Dev Date: Tue, 29 Sep 2026 00:29:28 +0200 Subject: [PATCH] =?UTF-8?q?feat(aegis):=200.18.0=20=E2=80=94=20Consolidate?= =?UTF-8?q?=20becomes=20an=20address=20action,=20not=20a=20second=20toggle?= =?UTF-8?q?=20row?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Receive tab carried two stacked toggle rows: Receive/Consolidate above Address & QR/Assets. That is a lot of chrome for a 380px panel, and the two rows were not the same kind of thing — Address and Assets are views of the wallet, while consolidating is an action on its UTXO set. Consolidate now sits with the other address actions, beside "Next unused address", with the sibling count on the button. The old toggle was also the only way out of the consolidate view, so that view gains its own "← Back to address". Entering still resets the inline host so the preview is costed fresh, which is what the toggle did. The Send tab keeps its Send/Consolidate toggle: there, consolidating really is an alternative way to send, so a toggle is the right shape. Removed the two now-dead [data-rcv-mode] blocks rather than leaving selectors that match nothing. Verified by real visibility rather than the hidden attribute — a child of a hidden parent keeps hidden=false, which made a first check look like both panes were showing at once. rcvNormal and the address pane go away while the consolidate pane shows, and Back restores them. --- bundled-addons/aegis/addon.json | 2 +- bundled-addons/aegis/panel.html | 18 ++++++++++++++---- bundled-addons/aegis/panel.js | 26 +++++++++++++++++--------- 3 files changed, 32 insertions(+), 14 deletions(-) diff --git a/bundled-addons/aegis/addon.json b/bundled-addons/aegis/addon.json index d9f82af2..f50300d8 100644 --- a/bundled-addons/aegis/addon.json +++ b/bundled-addons/aegis/addon.json @@ -1,7 +1,7 @@ { "id": "aegis", "name": "Aegis Wallet", - "version": "0.17.0", + "version": "0.18.0", "category": "plugin", "description": "Multi-chain wallet (BCH, BTC, TRX, ETH, SOL, SC, DGB) derived from your Theseus vault. Dapps get window.bitcoincash on .x sites; window.tronWeb / window.tronLink / window.ethereum / window.solana on any https page.", "author": "Silent Mode", diff --git a/bundled-addons/aegis/panel.html b/bundled-addons/aegis/panel.html index 3ce0ac9c..6b70b579 100644 --- a/bundled-addons/aegis/panel.html +++ b/bundled-addons/aegis/panel.html @@ -763,10 +763,14 @@ the normal Receive view (QR + address) and the Consolidate view (inline picker for sweeping other-wallet balances into this one). Hidden when there is nothing to consolidate. --> - +
@@ -810,6 +815,11 @@
diff --git a/bundled-addons/aegis/panel.js b/bundled-addons/aegis/panel.js index e3ede775..f331a1ea 100644 --- a/bundled-addons/aegis/panel.js +++ b/bundled-addons/aegis/panel.js @@ -2162,8 +2162,6 @@ function paintRcvView() { function paintRcvMode() { const normal = $("rcvNormal"); const cons = $("rcvConsolidate"); if (!normal || !cons) return; - const buttons = document.querySelectorAll("[data-rcv-mode]"); - buttons.forEach((b) => b.classList.toggle("on", b.dataset.rcvMode === rcvMode)); normal.hidden = rcvMode !== "receive"; cons.hidden = rcvMode !== "consolidate"; if (rcvMode === "consolidate") { @@ -3336,7 +3334,9 @@ function render() { cur && w.chain === cur.chain && w.network === cur.network && w.id !== state.selectedWalletId, ); const showToggle = others.length > 0; - for (const [wrapId, cntId] of [["sendModeToggle", "sendConsolidateCount"], ["rcvModeToggle", "rcvConsolidateCount"]]) { + // Send keeps its toggle. Receive's became a button in the address actions + // (0.18.0), so it is shown/counted the same way but is not a toggle. + for (const [wrapId, cntId] of [["sendModeToggle", "sendConsolidateCount"], ["rcvConsolidateBtn", "rcvConsolidateCount"]]) { const wrap = $(wrapId); if (!wrap) continue; wrap.hidden = !showToggle; if (showToggle) { @@ -3967,18 +3967,26 @@ document.querySelectorAll("[data-send-mode]").forEach((b) => b.addEventListener( consolidateInlineHost = null; // force re-render on next switch paintSendMode(); })); +// Consolidate, now an address action rather than a view toggle. Entering the +// view forces a re-render of the inline host so the preview is costed fresh +// each time, the same thing the old toggle did. +if ($("rcvConsolidateBtn")) $("rcvConsolidateBtn").addEventListener("click", () => { + rcvMode = "consolidate"; + consolidateInlineHost = null; + paintRcvMode(); +}); +if ($("rcvConsolidateBack")) $("rcvConsolidateBack").addEventListener("click", () => { + rcvMode = "receive"; + consolidateInlineHost = null; + paintRcvMode(); + paintRcvView(); +}); // Address & QR / Assets — the persistent pair inside the Receive body. document.querySelectorAll("[data-rcv-view]").forEach((b) => b.addEventListener("click", () => { rcvView = b.dataset.rcvView === "assets" ? "assets" : "address"; try { localStorage.setItem("aegis/rcvView", rcvView); } catch (_e) {} paintRcvView(); })); -document.querySelectorAll("[data-rcv-mode]").forEach((b) => b.addEventListener("click", () => { - rcvMode = b.dataset.rcvMode; - consolidateInlineHost = null; - paintRcvMode(); - paintRcvView(); -})); ["sendTo", "sendAmt"].forEach((id) => $(id).addEventListener("input", () => { if (id === "sendAmt" && sendMax) return; if (id === "sendAmt") updateSendFiatPreview();