aboutsummaryrefslogtreecommitdiff
path: root/src/renderHtml.tsx
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2017-02-13 00:44:44 +0100
committerFlorian Dold <florian.dold@gmail.com>2017-02-13 00:44:44 +0100
commit08d4a5b62532f867d3af67d8b8ad72921d02412a (patch)
tree83f3c6b1ee94f46cb4c229385843baf4a158b7db /src/renderHtml.tsx
parentdd5b6797910600e2ba39cde95aabea098eb637a5 (diff)
implement new protocol / naming
Diffstat (limited to 'src/renderHtml.tsx')
-rw-r--r--src/renderHtml.tsx7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/renderHtml.tsx b/src/renderHtml.tsx
index 40b48094e..79e101b17 100644
--- a/src/renderHtml.tsx
+++ b/src/renderHtml.tsx
@@ -30,7 +30,12 @@ export function prettyAmount(amount: AmountJson) {
}
export function renderContract(contract: Contract): JSX.Element {
- let merchantName = <strong>{contract.merchant.name}</strong>;
+ let merchantName;
+ if (contract.merchant && contract.merchant.name) {
+ merchantName = <strong>{contract.merchant.name}</strong>;
+ } else {
+ merchantName = <strong>(pub: {contract.merchant_pub})</strong>;
+ }
let amount = <strong>{prettyAmount(contract.amount)}</strong>;
return (