aboutsummaryrefslogtreecommitdiff
path: root/lib/wallet
diff options
context:
space:
mode:
authortg(x) <*@tg-x.net>2016-10-05 21:40:47 +0200
committertg(x) <*@tg-x.net>2016-10-05 21:40:47 +0200
commit7851816f14d5f58e78369bfc8c984a1101e92bc5 (patch)
treef7a4475142dee85d3272d0c8d4b2fdc6291b56ec /lib/wallet
parent1a97b04106cb8836b031bf3b12ab00d9090cf8dc (diff)
parent0c8a6e21f0324e25d1ec59bcdddf8c5c49b01421 (diff)
downloadwallet-core-7851816f14d5f58e78369bfc8c984a1101e92bc5.tar.xz
Merge branch 'master' of taler.net:/var/git/wallet-webex
Diffstat (limited to 'lib/wallet')
-rw-r--r--lib/wallet/renderHtml.tsx (renamed from lib/wallet/renderHtml.ts)29
1 files changed, 15 insertions, 14 deletions
diff --git a/lib/wallet/renderHtml.ts b/lib/wallet/renderHtml.tsx
index 6d9823d71..f3059f940 100644
--- a/lib/wallet/renderHtml.ts
+++ b/lib/wallet/renderHtml.tsx
@@ -23,27 +23,28 @@
import {AmountJson, Contract} from "./types";
-
export function prettyAmount(amount: AmountJson) {
let v = amount.value + amount.fraction / 1e6;
return `${v.toFixed(2)} ${amount.currency}`;
}
-export function renderContract(contract: Contract): any {
+export function renderContract(contract: Contract): JSX.Element {
let merchantName = m("strong", contract.merchant.name);
let amount = m("strong", prettyAmount(contract.amount));
- return m("div", {}, [
- m("p",
- i18n.parts`${merchantName}
+ return (
+ <div>
+ <p>{
+ i18n.parts`${merchantName}
wants to enter a contract over ${amount}
- with you.`),
- m("p",
- i18n`You are about to purchase:`),
- m('ul',
-
- contract.products.map(
- (p: any) => m("li",
- `${p.description}: ${prettyAmount(p.price)}`)))
- ]);
+ with you.`}
+ </p>
+ <p>{i18n`You are about to purchase:`}</p>
+ <ul>
+ {contract.products.map(
+ (p: any) => (<li>{`${p.description}: ${prettyAmount(p.price)}`}</li>))
+ }
+ </ul>
+ </div>
+ );
} \ No newline at end of file