fix: display swaps and contract calls correctly in tx history (closes #3) #10

Merged
sneak merged 6 commits from fix/swap-display into main 2026-02-27 23:08:16 +01:00
Showing only changes of commit 5936199676 - Show all commits

View File

@@ -44,11 +44,11 @@ function txAddressHtml(address, ensName, title) {
const extLink = `<a href="${link}" target="_blank" rel="noopener" class="inline-flex items-center">${EXT_ICON}</a>`; const extLink = `<a href="${link}" target="_blank" rel="noopener" class="inline-flex items-center">${EXT_ICON}</a>`;
let html = `<div class="mb-1">${blockie}</div>`; let html = `<div class="mb-1">${blockie}</div>`;
if (title) { if (title) {
html += `<div class="flex items-center font-bold">${dot}${escapeHtml(title)}</div>`; html += `<div class="font-bold">${escapeHtml(title)}</div>`;
} }
if (ensName) { if (ensName) {
html += html +=
`<div class="flex items-center">${title ? "" : dot}` + `<div class="flex items-center">${dot}` +
copyableHtml(ensName, "") + copyableHtml(ensName, "") +
extLink + extLink +
`</div>` + `</div>` +
@@ -57,7 +57,7 @@ function txAddressHtml(address, ensName, title) {
`</div>`; `</div>`;
} else { } else {
html += html +=
`<div class="flex items-center">${title ? "" : dot}` + `<div class="flex items-center">${dot}` +
copyableHtml(address, "break-all") + copyableHtml(address, "break-all") +
extLink + extLink +
`</div>`; `</div>`;