From 29b107f93763420c5bc0cbde38c68e40e705ff38 Mon Sep 17 00:00:00 2001
From: Florian Dold <florian.dold@gmail.com>
Date: Thu, 1 Jun 2017 18:46:07 +0200
Subject: fix terminology, better types

---
 src/webex/renderHtml.tsx | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

(limited to 'src/webex/renderHtml.tsx')

diff --git a/src/webex/renderHtml.tsx b/src/webex/renderHtml.tsx
index 70cd61d62..4dd7baded 100644
--- a/src/webex/renderHtml.tsx
+++ b/src/webex/renderHtml.tsx
@@ -27,7 +27,7 @@
 import { amountToPretty } from "../helpers";
 import * as i18n from "../i18n";
 import {
-  Contract,
+  ContractTerms,
 } from "../types";
 
 import * as React from "react";
@@ -35,14 +35,14 @@ import * as React from "react";
 /**
  * Render contract terms for the end user to view.
  */
-export function renderContract(contract: Contract): JSX.Element {
+export function renderContractTerms(contractTerms: ContractTerms): JSX.Element {
   let merchantName;
-  if (contract.merchant && contract.merchant.name) {
-    merchantName = <strong>{contract.merchant.name}</strong>;
+  if (contractTerms.merchant && contractTerms.merchant.name) {
+    merchantName = <strong>{contractTerms.merchant.name}</strong>;
   } else {
-    merchantName = <strong>(pub: {contract.merchant_pub})</strong>;
+    merchantName = <strong>(pub: {contractTerms.merchant_pub})</strong>;
   }
-  const amount = <strong>{amountToPretty(contract.amount)}</strong>;
+  const amount = <strong>{amountToPretty(contractTerms.amount)}</strong>;
 
   return (
     <div>
@@ -53,7 +53,7 @@ export function renderContract(contract: Contract): JSX.Element {
       </i18n.Translate>
       <p>{i18n.str`You are about to purchase:`}</p>
       <ul>
-        {contract.products.map(
+        {contractTerms.products.map(
           (p: any, i: number) => (<li key={i}>{`${p.description}: ${amountToPretty(p.price)}`}</li>))
         }
       </ul>
-- 
cgit v1.2.3

