aboutsummaryrefslogtreecommitdiff
path: root/src/renderHtml.tsx
diff options
context:
space:
mode:
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 (