From 08d4a5b62532f867d3af67d8b8ad72921d02412a Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Mon, 13 Feb 2017 00:44:44 +0100 Subject: implement new protocol / naming --- src/renderHtml.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/renderHtml.tsx') 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 = {contract.merchant.name}; + let merchantName; + if (contract.merchant && contract.merchant.name) { + merchantName = {contract.merchant.name}; + } else { + merchantName = (pub: {contract.merchant_pub}); + } let amount = {prettyAmount(contract.amount)}; return ( -- cgit v1.2.3