`;
+ html += `
`;
html += `
${ago}${dirLabel}${err}
`;
html += `
${dot}${addrStr}${amountStr}
`;
html += `
`;
@@ -417,7 +417,12 @@ function init(ctx) {
}
const addr = currentAddress();
const address = addr ? addr.address : "";
+ $("receive-dot").innerHTML = address ? addressDotHtml(address) : "";
$("receive-address").textContent = address;
+ const link = address ? `https://etherscan.io/address/${address}` : "";
+ $("receive-etherscan-link").innerHTML = link
+ ? `
${EXT_ICON}`
+ : "";
if (address) {
QRCode.toCanvas($("receive-qr"), address, {
width: 200,
diff --git a/src/popup/views/send.js b/src/popup/views/send.js
index 0749ceb..7af8e13 100644
--- a/src/popup/views/send.js
+++ b/src/popup/views/send.js
@@ -1,11 +1,18 @@
// Send view: collect To, Amount, Token. Then go to confirmation.
-const { $, showFlash, formatAddressHtml } = require("./helpers");
+const { $, showFlash, addressDotHtml, escapeHtml } = require("./helpers");
const { state, currentAddress } = require("../../shared/state");
let ctx;
const { getProvider } = require("../../shared/balances");
const { KNOWN_SYMBOLS } = require("../../shared/tokens");
+const EXT_ICON =
+ `
` +
+ ``;
+
function isSpoofedToken(t) {
const upper = (t.symbol || "").toUpperCase();
if (!KNOWN_SYMBOLS.has(upper)) return false;
@@ -34,11 +41,17 @@ function renderSendTokenSelect(addr) {
function updateSendBalance() {
const addr = currentAddress();
if (!addr) return;
- $("send-from").innerHTML = formatAddressHtml(
- addr.address,
- addr.ensName || null,
- null,
- );
+ const dot = addressDotHtml(addr.address);
+ const link = `https://etherscan.io/address/${addr.address}`;
+ const extLink = `
${EXT_ICON}`;
+ let fromHtml = "";
+ if (addr.ensName) {
+ fromHtml += `
${dot}${escapeHtml(addr.ensName)}
`;
+ fromHtml += `
${escapeHtml(addr.address)}${extLink}
`;
+ } else {
+ fromHtml += `
${dot}${escapeHtml(addr.address)}${extLink}
`;
+ }
+ $("send-from").innerHTML = fromHtml;
const token = state.selectedToken || $("send-token").value;
if (token === "ETH") {
$("send-balance").textContent =