Truncate addresses by 2 chars to compensate for color dot width
Some checks failed
check / check (push) Has been cancelled
Some checks failed
check / check (push) Has been cancelled
Move truncateMiddle to helpers.js for reuse. Shorten displayed addresses by 2 characters wherever a dot is shown: home view (40 char max), tx list (maxAddr - 2), and address detail container (40ch width).
This commit is contained in:
@@ -4,6 +4,7 @@ const {
|
||||
showFlash,
|
||||
balanceLinesForAddress,
|
||||
addressDotHtml,
|
||||
truncateMiddle,
|
||||
} = require("./helpers");
|
||||
const { state, saveState } = require("../../shared/state");
|
||||
const { deriveAddressFromXpub } = require("../../shared/wallet");
|
||||
@@ -47,7 +48,7 @@ function render(ctx) {
|
||||
}
|
||||
const addrUsd = formatUsd(getAddressValueUsd(addr));
|
||||
html += `<div class="flex text-xs">`;
|
||||
html += `<span class="flex items-center" style="width:42ch;max-width:100%">${addr.ensName ? "" : dot}${addr.address}</span>`;
|
||||
html += `<span class="flex items-center" style="width:42ch;max-width:100%">${addr.ensName ? "" : dot}${truncateMiddle(addr.address, 40)}</span>`;
|
||||
html += `<span class="text-right text-muted flex-1">${addrUsd}</span>`;
|
||||
html += `</div>`;
|
||||
html += balanceLinesForAddress(addr);
|
||||
|
||||
Reference in New Issue
Block a user