From 4956f8f6c17103023ef852b5b05ab45d9b0eea76 Mon Sep 17 00:00:00 2001 From: Local Dev Date: Wed, 23 Sep 2026 02:49:05 +0200 Subject: [PATCH] =?UTF-8?q?chore(aegis):=200.9.3=20=E2=80=94=20one=20row?= =?UTF-8?q?=20shape,=20assets=20for=20every=20coin?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Address row is now icon Β· label Β· amount Β· one button. ✎ and πŸ—‘ were two controls for what is really one idea ("change this wallet"), and the manage modal already holds rename, derivation path AND remove β€” so a single β‹― opens it. That also stops Remove sitting one stray click away from Rename. Default/legacy wallets show a lock instead. The per-address amount is back unconditionally: 0.9.2 hid it when a coin had one address, but the row reads as a breakdown and the gap looked like missing data. The duplicate that actually mattered β€” the drilldown subtitle β€” stays gone. The Assets card only ever had branches for SOL, BCH and TRX, so ETH fell through to a hidden card despite the adapter returning tokens in the same shape. The generic branch is now keyed on the DATA rather than a list of chain ids: any chain whose snapshot carries `tokens` renders, which means ETH works today and a chain added later works for free. Only the label ("TRC20" / "ERC20" / "Tokens") varies by chain. Dropped the "Pick a coin" title row from the coin picker β€” the search field's own placeholder already says what the pane is, so the title was a line of chrome restating it and pushing the list down. Search and close now share the top row. Token history stays in History despite the request coming from tokens being mistaken for transactions: a wallet that had only ever moved USDT still showed an empty history without it. --- bundled-addons/aegis/addon.json | 2 +- bundled-addons/aegis/panel.html | 3 ++ bundled-addons/aegis/panel.js | 75 +++++++++++++++------------------ 3 files changed, 38 insertions(+), 42 deletions(-) diff --git a/bundled-addons/aegis/addon.json b/bundled-addons/aegis/addon.json index 7ff71e12..7a96b815 100644 --- a/bundled-addons/aegis/addon.json +++ b/bundled-addons/aegis/addon.json @@ -1,7 +1,7 @@ { "id": "aegis", "name": "Aegis Wallet", - "version": "0.9.2", + "version": "0.9.3", "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 44291c13..4a7901fd 100644 --- a/bundled-addons/aegis/panel.html +++ b/bundled-addons/aegis/panel.html @@ -102,6 +102,9 @@ .netchip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .7; } /* Currency-picker search + all-coins catalogue (0.8.4). */ #drop .pickersearch { padding: 8px; border-bottom: 1px solid var(--line); } + /* Search + close share the top row now that the title row is gone. */ + #drop .pickersearch-top { display: flex; align-items: center; gap: 6px; } + #drop .pickersearch-top input { flex: 1; min-width: 0; } #drop .pickersearch input { width: 100%; box-sizing: border-box; background: rgba(255,255,255,.04); border: 1px solid var(--line); color: var(--ink); border-radius: 7px; padding: 7px 10px; font: inherit; font-size: 12.5px; outline: none; } diff --git a/bundled-addons/aegis/panel.js b/bundled-addons/aegis/panel.js index 1853e047..b839239b 100644 --- a/bundled-addons/aegis/panel.js +++ b/bundled-addons/aegis/panel.js @@ -573,13 +573,15 @@ function fillPicker() { `); } } + // 0.9.3: the "Pick a coin" title row is gone β€” the search field's + // own placeholder already says what this pane is, so the title was + // a line of chrome restating it and pushing the list down. d.innerHTML = ` -
- Pick a coin +
+
-
${ownedRows.length ? `
Your wallets
${ownedRows.join("")}` : ""} ${otherRows.length ? `
Add a new wallet
${otherRows.join("")}` : ""} @@ -2463,7 +2465,8 @@ function wireStripDragDrop(el, chainGroups) { // Inline replacement for the modal address list. Rendered directly into // the wallet strip element when stripView.mode === "addresses". Header // row has a back arrow (returns to the coins summary) and the coin's -// name/logo; body rows show one wallet each with an inline ✎ / πŸ—‘. +// name/logo; each body row is icon Β· label Β· copy Β· amount Β· one β‹― that +// opens the manage modal (rename / path / remove). // Assets live in the Receive tab's Assets card, not here β€” see 0.9.2. function renderInlineCoinList(el, groupKey, group) { const { meta, wallets: gw } = group; @@ -2504,24 +2507,21 @@ function renderInlineCoinList(el, groupKey, group) { // Receive, and a shortened copy here was a second, less useful // rendering of the same string. The row now carries identity (name) // and, only when there is more than one address to compare, balance. - const canRemoveRow = !(w.isDefault || w.isLegacy); - const rowRemove = canRemoveRow - ? `` - : `πŸ”’`; - // With a single address the amount is identical to the header's - // balance two rows up; showing it a third time is noise. - const amountCell = multiAddr - ? `${esc(bal)}${esc(meta.ticker)}` - : ``; + // 0.9.3: one row, one shape β€” icon Β· label Β· amount Β· one button. + // ✎ and πŸ—‘ were two controls for what is really one idea ("change + // this wallet"), and the manage modal already holds rename, + // derivation path AND remove. A single β‹― opens it, which also stops + // Remove sitting one stray click away from Rename. + const locked = w.isDefault || w.isLegacy; + const rowMenu = locked + ? `πŸ”’` + : ``; return `
${logoSvg(meta.logo, 14)} ${esc(w.label || shortName || "β€”")} ${fullAddr ? `` : ``} - ${amountCell} - - - ${rowRemove} - + ${esc(bal)}${esc(meta.ticker)} + ${rowMenu}
`; }).join(""); // Surface any adapter errors from the wallets in this group. If a fetch @@ -2605,20 +2605,11 @@ function renderInlineCoinList(el, groupKey, group) { const w = (state?.wallets || []).find((x) => x.id === b.dataset.lpedit); if (w) openWalletManageModal(w); })); - el.querySelectorAll("[data-lpremove]").forEach((b) => b.addEventListener("click", async (e) => { - e.stopPropagation(); - try { - const gone = await removeWalletWithConfirm(b.dataset.lpremove); - // Removing the last address under this coin leaves the drilldown - // pointing at an empty group β€” fall back to the coin list. - if (gone) { - const left = (state?.wallets || []).filter((w) => w.id !== b.dataset.lpremove && group.wallets.some((g) => g.id === w.id)); - if (!left.length) stripView = { mode: "coins", groupKey: null }; - renderWalletStrip(); - } - } catch (er) { showErr(cleanErr(er)); } - })); - // Per-address asset list toggle. + // Removing a wallet now happens inside the manage modal (the row's β‹―), + // so the row no longer emits its own remove button. The modal calls + // render() itself, which redraws the strip β€” including falling back to + // the coin list when the last address under a coin goes away. + el.querySelector("#stripAddMore").addEventListener("click", async () => { // Add another wallet of the same coin+network directly, without // opening the picker sheet β€” the user is already inside this coin's @@ -3078,14 +3069,18 @@ function renderTokens() { }).catch(() => {}); return; } - // TRX wallets: TRC20 balances. Read-only β€” Aegis has no TRC20 spend - // path yet, so there's no Send button here (unlike SPL above). - if (chain() === "trx") { + // Every other account-model chain (TRX, ETH, and anything added later) + // renders from the same `tokens` shape the adapters already return, so + // this is keyed on the DATA rather than on a list of chain ids β€” a new + // chain gets the asset list for free instead of silently falling + // through to a hidden card the way ETH did until 0.9.3. + { const tokens = s?.tokens || []; - card.hidden = tokens.length === 0; - const hintEl = $("tokensHint"); - if (hintEl) hintEl.textContent = "TRC20 tokens held by this wallet. Read-only in this build β€” use the explorer link to move them."; + if (!tokens.length) { card.hidden = true; return; } card.hidden = false; + const hintEl = $("tokensHint"); + const kindLabel = chain() === "trx" ? "TRC20" : chain() === "eth" ? "ERC20" : "Tokens"; + if (hintEl) hintEl.textContent = `${kindLabel} tokens held by this wallet. Read-only in this build β€” open the explorer from the header to move them.`; // A symbol claimed by more than one contract is the lookalike pattern: // spam mints borrow a trusted ticker so a careless send lands on the // wrong contract. We can't tell which is genuine, so we don't guess β€” @@ -3121,9 +3116,7 @@ function renderTokens() {
${amount}
`; }).join(""); - return; } - card.hidden = true; } // Same shape as index.js's fmtTokenAmount β€” string-safe for u64 SPL amounts. function fmtTokenAmount(rawStr, decimals) {