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. -->
-
-
-
-
+
+
+
+
+
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();