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) {