fix: show wallet/address titles in send, txStatus, and home tx list (closes #26, closes #27, closes #28)
All checks were successful
check / check (push) Successful in 22s
All checks were successful
check / check (push) Successful in 22s
- send.js: show addressTitle() above ENS name and address in From field - txStatus.js: show addressTitle() in To address when it's a local wallet - home.js: show addressTitle() for counterparties in tx list when they are local wallet addresses
This commit is contained in:
@@ -6,6 +6,7 @@ const {
|
||||
isoDate,
|
||||
timeAgo,
|
||||
addressDotHtml,
|
||||
addressTitle,
|
||||
escapeHtml,
|
||||
truncateMiddle,
|
||||
} = require("./helpers");
|
||||
@@ -110,8 +111,9 @@ function renderHomeTxList(ctx) {
|
||||
const amountStr = tx.value
|
||||
? escapeHtml(tx.value + " " + tx.symbol)
|
||||
: escapeHtml(tx.symbol);
|
||||
const title = addressTitle(counterparty, state.wallets);
|
||||
const maxAddr = Math.max(32, 36 - Math.max(0, amountStr.length - 10));
|
||||
const displayAddr = truncateMiddle(counterparty, maxAddr);
|
||||
const displayAddr = title || truncateMiddle(counterparty, maxAddr);
|
||||
const addrStr = escapeHtml(displayAddr);
|
||||
const dot = addressDotHtml(counterparty);
|
||||
const err = tx.isError ? " (failed)" : "";
|
||||
|
||||
Reference in New Issue
Block a user