diff options
author | Florian Dold <florian.dold@gmail.com> | 2016-10-10 03:32:18 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2016-10-10 03:32:18 +0200 |
commit | 705b68df317c9311e0f4ec5a797682cb1487863a (patch) | |
tree | 351e55009f3797ecaa9c51f8f9823010e2e08953 /pages/confirm-create-reserve.tsx | |
parent | ce4d9c47031870136ec2d73c7e81afbdfd249357 (diff) |
wording
Diffstat (limited to 'pages/confirm-create-reserve.tsx')
-rw-r--r-- | pages/confirm-create-reserve.tsx | 38 |
1 files changed, 29 insertions, 9 deletions
diff --git a/pages/confirm-create-reserve.tsx b/pages/confirm-create-reserve.tsx index d0a08aac3..0a7b9daa5 100644 --- a/pages/confirm-create-reserve.tsx +++ b/pages/confirm-create-reserve.tsx @@ -89,7 +89,8 @@ abstract class ImplicitStateComponent<PropType> extends preact.Component<PropTyp function renderReserveCreationDetails(rci: ReserveCreationInfo|null) { if (!rci) { - return <p>Details will be displayed when a valid exchange provider URL is entered.</p> + return <p> + Details will be displayed when a valid exchange provider URL is entered.</p> } let denoms = rci.selectedDenoms; @@ -194,7 +195,7 @@ class ExchangeSelection extends ImplicitStateComponent<ExchangeSelectionProps> { renderAdvanced(): JSX.Element { - if (this.detailCollapsed()) { + if (this.detailCollapsed() && this.url() !== null) { return ( <button className="linky" onClick={() => this.detailCollapsed(false)}> @@ -226,6 +227,31 @@ class ExchangeSelection extends ImplicitStateComponent<ExchangeSelectionProps> { return `${amountToPretty(totalCost)}`; } + renderFeeStatus() { + if (this.reserveCreationInfo()) { + return ( + <p> + The exchange provider will charge + {" "} + {this.renderFee()} + {" "} + in fees. + </p> + ); + } + if (this.url() && !this.statusString()) { + let shortName = URI(this.url()!).host(); + return <p>Waiting for a response from + <em>{shortName}</em> + </p>; + } + return ( + <p> + Information about fees will be available when an exchange provider is selected. + </p> + ); + } + render(props: ExchangeSelectionProps): JSX.Element { return ( <div> @@ -234,13 +260,7 @@ class ExchangeSelection extends ImplicitStateComponent<ExchangeSelectionProps> { <strong>{amountToPretty(props.amount)}</strong> {" from your bank account into your wallet."} </p> - <p> - The exchange provider will charge - {" "} - {this.renderFee()} - {" "} - in fees. - </p> + {this.renderFeeStatus()} <button className="accept" disabled={this.reserveCreationInfo() == null} onClick={() => this.confirmReserve()}> |