diff --git a/src/popup/index.html b/src/popup/index.html
index 6201ee9..dfb693e 100644
--- a/src/popup/index.html
+++ b/src/popup/index.html
@@ -172,11 +172,12 @@
-
+
+
-
diff --git a/src/popup/views/home.js b/src/popup/views/home.js
index c456832..55a066c 100644
--- a/src/popup/views/home.js
+++ b/src/popup/views/home.js
@@ -27,17 +27,31 @@ function findActiveAddr() {
function renderTotalValue() {
const el = $("total-value");
+ const subEl = $("total-value-sub");
+ const priceEl = $("eth-price-display");
if (!el) return;
+
+ const ethPrice = getPrice("ETH");
+ if (priceEl) {
+ priceEl.textContent = ethPrice ? "ETH " + formatUsd(ethPrice) : "";
+ }
+
const addr = findActiveAddr();
if (!addr) {
el.textContent = "";
+ if (subEl) subEl.textContent = "";
return;
}
const ethBal = parseFloat(addr.balance || "0");
const ethStr = ethBal.toFixed(4) + " ETH";
- const usd = getAddressValueUsd(addr);
- const usdStr = usd !== null ? " (" + formatUsd(usd) + " USD)" : "";
- el.textContent = ethStr + usdStr;
+ const ethUsd = ethPrice ? " (" + formatUsd(ethBal * ethPrice) + ")" : "";
+ el.textContent = ethStr + ethUsd;
+
+ if (subEl) {
+ const totalUsd = getAddressValueUsd(addr);
+ subEl.textContent =
+ totalUsd !== null ? "Total: " + formatUsd(totalUsd) : "";
+ }
}
const EXT_ICON =