From 15e856e63fb4032e65edd9586854774cc4bf713f Mon Sep 17 00:00:00 2001 From: user Date: Fri, 27 Feb 2026 14:18:29 -0800 Subject: [PATCH] fix: show wallet name for own addresses on approve-tx view (closes #21) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The approve-tx view was showing raw addresses for From/To even when they belonged to the user's wallet. Now uses addressTitle() to display the wallet name (e.g. 'My Wallet — Address 1') consistently with other views. --- src/popup/views/approval.js | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/popup/views/approval.js b/src/popup/views/approval.js index 58319ed..abd29c7 100644 --- a/src/popup/views/approval.js +++ b/src/popup/views/approval.js @@ -1,4 +1,10 @@ -const { $, addressDotHtml, escapeHtml, showView } = require("./helpers"); +const { + $, + addressDotHtml, + addressTitle, + escapeHtml, + showView, +} = require("./helpers"); const { state, saveState } = require("../../shared/state"); const { formatEther, formatUnits, Interface, toUtf8String } = require("ethers"); const { ERC20_ABI } = require("../../shared/constants"); @@ -22,7 +28,15 @@ function approvalAddressHtml(address) { const dot = addressDotHtml(address); const link = `https://etherscan.io/address/${address}`; const extLink = `${EXT_ICON}`; - return `
${dot}${escapeHtml(address)}${extLink}
`; + const title = addressTitle(address, state.wallets); + let html = ""; + if (title) { + html += `
${dot}${escapeHtml(title)}
`; + html += `
${escapeHtml(address)}${extLink}
`; + } else { + html += `
${dot}${escapeHtml(address)}${extLink}
`; + } + return html; } function formatTxValue(val) { -- 2.49.1