aboutsummaryrefslogtreecommitdiff
path: root/extension/popup/popup.tsx
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2016-01-24 19:57:09 +0100
committerFlorian Dold <florian.dold@gmail.com>2016-01-24 19:57:09 +0100
commit5f996fedbc7542e1ba757a5a5856e43931ad7939 (patch)
tree59bb9bc99253dadee2d8778dcefeaa1a7e0f6424 /extension/popup/popup.tsx
parent53654b3622de38c6cca5d29f9969eb9a67caf8a0 (diff)
parse json fulfillment url from payment
Diffstat (limited to 'extension/popup/popup.tsx')
-rw-r--r--extension/popup/popup.tsx9
1 files changed, 7 insertions, 2 deletions
diff --git a/extension/popup/popup.tsx b/extension/popup/popup.tsx
index 8bfb691ca..a19087b1a 100644
--- a/extension/popup/popup.tsx
+++ b/extension/popup/popup.tsx
@@ -101,13 +101,18 @@ function formatAmount(amount) {
return `${v.toFixed(2)} ${amount.currency}`;
}
+function abbrevKey(s: string) {
+ return m("span.abbrev", {title: s}, (s.slice(0,5) + ".."))
+}
+
+
function formatHistoryItem(historyItem) {
const d = historyItem.detail;
const t = historyItem.timestamp;
switch (historyItem.type) {
case "create-reserve":
return m("p",
- i18n`Created reserve of ${formatAmount(d.requestedAmount)} at ${formatTimestamp(
+ i18n.parts`Created reserve (${abbrevKey(d.reservePub)}) of ${formatAmount(d.requestedAmount)} at ${formatTimestamp(
t)}`);
case "withdraw":
return m("p",
@@ -143,7 +148,7 @@ var WalletHistory = {
}
let listing = _.map(history, formatHistoryItem);
if (listing.length > 0) {
- return listing;
+ return m("div.container", listing);
}
return i18n`Your wallet has no events recorded.`;
}