gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [taler-wallet-webex] branch master updated: fix display of


From: gnunet
Subject: [GNUnet-SVN] [taler-wallet-webex] branch master updated: fix display of contract terms rendering when already paid
Date: Fri, 02 Jun 2017 02:51:21 +0200

This is an automated email from the git hooks/post-receive script.

dold pushed a commit to branch master
in repository wallet-webex.

The following commit(s) were added to refs/heads/master by this push:
     new a425f289 fix display of contract terms rendering when already paid
a425f289 is described below

commit a425f289a46dc1f26c892c28622cb82dea02875e
Author: Florian Dold <address@hidden>
AuthorDate: Fri Jun 2 02:51:17 2017 +0200

    fix display of contract terms rendering when already paid
---
 src/i18n/de.po                        | 4 ++--
 src/i18n/en-US.po                     | 4 ++--
 src/i18n/fr.po                        | 4 ++--
 src/i18n/it.po                        | 4 ++--
 src/i18n/taler-wallet-webex.pot       | 4 ++--
 src/wallet.ts                         | 2 +-
 src/webex/pages/confirm-contract.html | 9 +++++++++
 src/webex/pages/confirm-contract.tsx  | 4 ++++
 8 files changed, 24 insertions(+), 11 deletions(-)

diff --git a/src/i18n/de.po b/src/i18n/de.po
index d90a9340..79f6a6e1 100644
--- a/src/i18n/de.po
+++ b/src/i18n/de.po
@@ -42,13 +42,13 @@ msgstr ""
 msgid "Exchanges in the wallet:"
 msgstr ""
 
-#: src/webex/pages/confirm-contract.tsx:141
+#: src/webex/pages/confirm-contract.tsx:142
 #, c-format
 msgid "You have insufficient funds of the requested currency in your wallet."
 msgstr ""
 
 #. tslint:disable-next-line:max-line-length
-#: src/webex/pages/confirm-contract.tsx:143
+#: src/webex/pages/confirm-contract.tsx:144
 #, c-format
 msgid ""
 "You do not have any funds from an exchange that is accepted by this "
diff --git a/src/i18n/en-US.po b/src/i18n/en-US.po
index f45591db..2e97531f 100644
--- a/src/i18n/en-US.po
+++ b/src/i18n/en-US.po
@@ -42,13 +42,13 @@ msgstr ""
 msgid "Exchanges in the wallet:"
 msgstr ""
 
-#: src/webex/pages/confirm-contract.tsx:141
+#: src/webex/pages/confirm-contract.tsx:142
 #, c-format
 msgid "You have insufficient funds of the requested currency in your wallet."
 msgstr ""
 
 #. tslint:disable-next-line:max-line-length
-#: src/webex/pages/confirm-contract.tsx:143
+#: src/webex/pages/confirm-contract.tsx:144
 #, c-format
 msgid ""
 "You do not have any funds from an exchange that is accepted by this "
diff --git a/src/i18n/fr.po b/src/i18n/fr.po
index 17f596b2..c6fddd9c 100644
--- a/src/i18n/fr.po
+++ b/src/i18n/fr.po
@@ -42,13 +42,13 @@ msgstr ""
 msgid "Exchanges in the wallet:"
 msgstr ""
 
-#: src/webex/pages/confirm-contract.tsx:141
+#: src/webex/pages/confirm-contract.tsx:142
 #, c-format
 msgid "You have insufficient funds of the requested currency in your wallet."
 msgstr ""
 
 #. tslint:disable-next-line:max-line-length
-#: src/webex/pages/confirm-contract.tsx:143
+#: src/webex/pages/confirm-contract.tsx:144
 #, c-format
 msgid ""
 "You do not have any funds from an exchange that is accepted by this "
diff --git a/src/i18n/it.po b/src/i18n/it.po
index 17f596b2..c6fddd9c 100644
--- a/src/i18n/it.po
+++ b/src/i18n/it.po
@@ -42,13 +42,13 @@ msgstr ""
 msgid "Exchanges in the wallet:"
 msgstr ""
 
-#: src/webex/pages/confirm-contract.tsx:141
+#: src/webex/pages/confirm-contract.tsx:142
 #, c-format
 msgid "You have insufficient funds of the requested currency in your wallet."
 msgstr ""
 
 #. tslint:disable-next-line:max-line-length
-#: src/webex/pages/confirm-contract.tsx:143
+#: src/webex/pages/confirm-contract.tsx:144
 #, c-format
 msgid ""
 "You do not have any funds from an exchange that is accepted by this "
diff --git a/src/i18n/taler-wallet-webex.pot b/src/i18n/taler-wallet-webex.pot
index 17f596b2..c6fddd9c 100644
--- a/src/i18n/taler-wallet-webex.pot
+++ b/src/i18n/taler-wallet-webex.pot
@@ -42,13 +42,13 @@ msgstr ""
 msgid "Exchanges in the wallet:"
 msgstr ""
 
-#: src/webex/pages/confirm-contract.tsx:141
+#: src/webex/pages/confirm-contract.tsx:142
 #, c-format
 msgid "You have insufficient funds of the requested currency in your wallet."
 msgstr ""
 
 #. tslint:disable-next-line:max-line-length
-#: src/webex/pages/confirm-contract.tsx:143
+#: src/webex/pages/confirm-contract.tsx:144
 #, c-format
 msgid ""
 "You do not have any funds from an exchange that is accepted by this "
diff --git a/src/wallet.ts b/src/wallet.ts
index 0bbab15e..5b24f793 100644
--- a/src/wallet.ts
+++ b/src/wallet.ts
@@ -947,7 +947,7 @@ export class Wallet {
     // First check if we already payed for it.
     const transaction = await this.q().get(Stores.transactions, 
proposal.contractTermsHash);
     if (transaction) {
-      return "insufficient-balance";
+      return "paid";
     }
 
     // If not already payed, check if we could pay for it.
diff --git a/src/webex/pages/confirm-contract.html 
b/src/webex/pages/confirm-contract.html
index e5ba6840..394de582 100644
--- a/src/webex/pages/confirm-contract.html
+++ b/src/webex/pages/confirm-contract.html
@@ -56,6 +56,15 @@
       font-weight: bold;
       background: #FF8A8A;
     }
+
+    .okaybox {
+      border: 1px solid;
+      display: inline-block;
+      margin: 1em;
+      padding: 1em;
+      font-weight: bold;
+      background: #00FA9A;
+    }
   </style>
 </head>
 
diff --git a/src/webex/pages/confirm-contract.tsx 
b/src/webex/pages/confirm-contract.tsx
index e80aed19..7d552341 100644
--- a/src/webex/pages/confirm-contract.tsx
+++ b/src/webex/pages/confirm-contract.tsx
@@ -105,6 +105,7 @@ interface ContractPromptState {
   proposal: ProposalRecord|null;
   error: string|null;
   payDisabled: boolean;
+  alreadyPaid: boolean;
   exchanges: null|ExchangeRecord[];
 }
 
@@ -153,6 +154,8 @@ class ContractPrompt extends 
React.Component<ContractPromptProps, ContractPrompt
         this.setState({error: msgInsufficient});
       }
       this.setState({payDisabled: true});
+    } else if (payStatus === "paid") {
+      this.setState({alreadyPaid: true, payDisabled: false, error: null});
     } else {
       this.setState({payDisabled: false, error: null});
     }
@@ -193,6 +196,7 @@ class ContractPrompt extends 
React.Component<ContractPromptProps, ContractPrompt
           Confirm payment
         </button>
         <div>
+          {(this.state.alreadyPaid ? <p className="okaybox">You already paid 
for this, clicking "Confirm payment" will not cost money again.</p> : <p />)}
           {(this.state.error ? <p className="errorbox">{this.state.error}</p> 
: <p />)}
         </div>
         <Details exchanges={this.state.exchanges} contractTerms={c} 
collapsed={!this.state.error}/>

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]