aboutsummaryrefslogtreecommitdiff
path: root/src/webex/pages/confirm-create-reserve.tsx
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2017-06-04 20:16:09 +0200
committerFlorian Dold <florian.dold@gmail.com>2017-06-04 20:16:09 +0200
commit2cf33705c8ef95e04144b2a77cd4a79189136199 (patch)
treeb62b3b83d3b7fb951ba9ec00b676ff333ac73ef1 /src/webex/pages/confirm-create-reserve.tsx
parent2b1e88737f6496fb0ad8790b501edaa1d556d83d (diff)
downloadwallet-core-2cf33705c8ef95e04144b2a77cd4a79189136199.tar.xz
warn about incompatible versions on withdraw
Diffstat (limited to 'src/webex/pages/confirm-create-reserve.tsx')
-rw-r--r--src/webex/pages/confirm-create-reserve.tsx34
1 files changed, 33 insertions, 1 deletions
diff --git a/src/webex/pages/confirm-create-reserve.tsx b/src/webex/pages/confirm-create-reserve.tsx
index ca8517a25..f8f53510c 100644
--- a/src/webex/pages/confirm-create-reserve.tsx
+++ b/src/webex/pages/confirm-create-reserve.tsx
@@ -414,10 +414,41 @@ class ExchangeSelection extends ImplicitStateComponent<ExchangeSelectionProps> {
);
}
+ renderUpdateStatus() {
+ const rci = this.reserveCreationInfo();
+ if (!rci) {
+ return null;
+ }
+ if (!rci.versionMatch) {
+ return null;
+ }
+ if (rci.versionMatch.compatible) {
+ return null;
+ }
+ if (rci.versionMatch.currentCmp == -1) {
+ return (
+ <p className="errorbox">
+ Your wallet might be outdated. The exchange has a higher, incompatible
+ protocol version.
+ </p>
+ );
+ }
+ if (rci.versionMatch.currentCmp == 1) {
+ return (
+ <p className="errorbox">
+ The chosen exchange might be outdated. The exchange has a lower, incompatible
+ protocol version.
+ </p>
+ );
+ }
+ throw Error("not reached");
+ }
+
renderConfirm() {
return (
<div>
{this.renderFeeStatus()}
+ <p>
<button className="pure-button button-success"
disabled={this.reserveCreationInfo() === null}
onClick={() => this.confirmReserve()}>
@@ -428,7 +459,8 @@ class ExchangeSelection extends ImplicitStateComponent<ExchangeSelectionProps> {
onClick={() => this.selectingExchange(true)}>
{i18n.str`Change Exchange Provider`}
</button>
- <br/>
+ </p>
+ {this.renderUpdateStatus()}
<Collapsible initiallyCollapsed={true} title="Fee and Spending Details">
{renderReserveCreationDetails(this.reserveCreationInfo())}
</Collapsible>