${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 `
`;
}).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) {