diff options
author | Florian Dold <florian.dold@gmail.com> | 2017-06-01 18:46:07 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2017-06-01 18:46:07 +0200 |
commit | 29b107f93763420c5bc0cbde38c68e40e705ff38 (patch) | |
tree | af659996507b043d1c21c61c56d639f926402033 /src/webex/renderHtml.tsx | |
parent | 26467674ba430707ffcdeb19b456dd2e325450bc (diff) | |
download | wallet-core-29b107f93763420c5bc0cbde38c68e40e705ff38.tar.xz |
fix terminology, better types
Diffstat (limited to 'src/webex/renderHtml.tsx')
-rw-r--r-- | src/webex/renderHtml.tsx | 14 |
1 files changed, 7 insertions, 7 deletions
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> |