aboutsummaryrefslogtreecommitdiff
path: root/src/webex
diff options
context:
space:
mode:
Diffstat (limited to 'src/webex')
-rw-r--r--src/webex/pages/confirm-create-reserve.tsx34
-rw-r--r--src/webex/style/wallet.css19
-rw-r--r--src/webex/wxBackend.ts2
3 files changed, 53 insertions, 2 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>
diff --git a/src/webex/style/wallet.css b/src/webex/style/wallet.css
index 752fc6d75..7bfb99e6c 100644
--- a/src/webex/style/wallet.css
+++ b/src/webex/style/wallet.css
@@ -220,3 +220,22 @@ span.spacer {
a.actionLink {
color: black;
}
+
+
+.errorbox {
+ border: 1px solid;
+ display: inline-block;
+ margin: 1em;
+ padding: 1em;
+ font-weight: bold;
+ background: #FF8A8A;
+}
+
+.okaybox {
+ border: 1px solid;
+ display: inline-block;
+ margin: 1em;
+ padding: 1em;
+ font-weight: bold;
+ background: #00FA9A;
+}
diff --git a/src/webex/wxBackend.ts b/src/webex/wxBackend.ts
index 6ea9a3cf4..b4e24e09c 100644
--- a/src/webex/wxBackend.ts
+++ b/src/webex/wxBackend.ts
@@ -58,7 +58,7 @@ const DB_NAME = "taler";
* In the future we might consider adding migration functions for
* each version increment.
*/
-const DB_VERSION = 17;
+const DB_VERSION = 18;
function handleMessage(db: IDBDatabase,
wallet: Wallet,