You have no balance to show. Need some {helpLink} getting started?
;
+ }
+
render(): JSX.Element {
let wallet = this.myWallet;
if (this.gotError) {
return i18n`Error: could not retrieve balance information.`;
}
if (!wallet) {
- return
+ return this.renderEmpty();
}
console.log(wallet);
let listing = Object.keys(wallet).map((key) => {
@@ -220,13 +231,8 @@ class WalletBalance extends preact.Component {
if (listing.length > 0) {
return
{listing}
;
}
- let helpLink = (
-
- help
-
- );
- return i18n.parts`You have no balance to show. Need some ${helpLink} getting started?`;
+ return this.renderEmpty();
}
}
@@ -262,13 +268,17 @@ function formatHistoryItem(historyItem: HistoryRecord) {
d.requestedAmount)}.`}
);
- case "confirm-reserve":
+ case "confirm-reserve": {
+ // FIXME: eventually remove compat fix
+ let exchange = d.exchangeBaseUrl ? URI(d.exchangeBaseUrl).host() : "??";
+ let amount = formatAmount(d.requestedAmount);
+ let pub = abbrev(d.reservePub);
return (
- {i18n.parts`Started to withdraw from reserve (${abbrev(d.reservePub)}) of ${formatAmount(
- d.requestedAmount)}.`}
+ {i18n.parts`Started to withdraw ${amount} from ${exchange} (${pub}).`}
);
+ }
case "offer-contract": {
let link = chrome.extension.getURL("view-contract.html");
let linkElem = {abbrev(d.contractHash)};
@@ -279,11 +289,14 @@ function formatHistoryItem(historyItem: HistoryRecord) {
);
}
- case "depleted-reserve":
+ case "depleted-reserve": {
+ let exchange = d.exchangeBaseUrl ? URI(d.exchangeBaseUrl).host() : "??";
+ let amount = formatAmount(d.requestedAmount);
+ let pub = abbrev(d.reservePub);
return (
- {i18n.parts`Withdraw from reserve (${abbrev(d.reservePub)}) of ${formatAmount(
- d.requestedAmount)} completed.`}
+ {i18n.parts`Withdrew ${amount} from ${exchange} (${pub}).`}
);
+ }
case "pay": {
let url = substituteFulfillmentUrl(d.fulfillmentUrl,
{H_contract: d.contractHash});
@@ -291,7 +304,7 @@ function formatHistoryItem(historyItem: HistoryRecord) {
let fulfillmentLinkElem = view product;
return (
- {i18n.parts`Confirmed payment of ${formatAmount(d.amount)} to merchant ${merchantElem}. (${fulfillmentLinkElem})`}
+ {i18n.parts`Paid ${formatAmount(d.amount)} to merchant ${merchantElem}. (${fulfillmentLinkElem})`}