[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-bank] branch master updated: suggest exchange to wal
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-bank] branch master updated: suggest exchange to wallet |
Date: |
Sun, 12 Feb 2017 04:01:38 +0100 |
This is an automated email from the git hooks/post-receive script.
dold pushed a commit to branch master
in repository bank.
The following commit(s) were added to refs/heads/master by this push:
new 73d0193 suggest exchange to wallet
73d0193 is described below
commit 73d0193436d615ae985040d5020a1928ce5bc462
Author: Florian Dold <address@hidden>
AuthorDate: Sun Feb 12 04:01:34 2017 +0100
suggest exchange to wallet
---
talerbank/app/static/profile-page.js | 3 ++-
talerbank/app/static/web-common | 2 +-
talerbank/app/templates/profile_page.html | 3 +++
talerbank/app/views.py | 4 ++++
talerbank/settings_base.py | 1 +
5 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/talerbank/app/static/profile-page.js
b/talerbank/app/static/profile-page.js
index f0791e3..804e23c 100644
--- a/talerbank/app/static/profile-page.js
+++ b/talerbank/app/static/profile-page.js
@@ -73,6 +73,7 @@ function init() {
precision = getConst("precision");
callback_url = getConst("callback-url");
reserve_pub = getConst("reserve-pub");
+ suggested_exchange = getConst("suggested-exchange");
if (reserve_pub) {
console.log("confirming reserve", reserve_pub);
taler.confirmReserve(reserve_pub);
@@ -85,7 +86,7 @@ function init() {
currency: bank_currency
};
console.log("callback_url", callback_url);
- taler.createReserve(callback_url, amount, ["TEST"]);
+ taler.createReserve(callback_url, amount, ["TEST"], suggested_exchange);
};
}
diff --git a/talerbank/app/static/web-common b/talerbank/app/static/web-common
index dc9d5ab..eba6115 160000
--- a/talerbank/app/static/web-common
+++ b/talerbank/app/static/web-common
@@ -1 +1 @@
-Subproject commit dc9d5ab2308fef7cdd1e8c95fbf4fdd51bed7bfb
+Subproject commit eba61157ae0c64ab5780f9744d988d281ae801fe
diff --git a/talerbank/app/templates/profile_page.html
b/talerbank/app/templates/profile_page.html
index c3e6eda..dd2ca67 100644
--- a/talerbank/app/templates/profile_page.html
+++ b/talerbank/app/templates/profile_page.html
@@ -26,6 +26,9 @@
{% if withdraw and withdraw == "success" %}
<meta name="reserve-pub" value="{{ reserve_pub }}">
{% endif %}
+ {% if suggested_exchange %}
+ <meta name="suggested-exchange" value="{{ suggested_exchange }}">
+ {% endif %}
<link rel="stylesheet" type="text/css" href="{% static "disabled-button.css"
%}">
<script src="{% static "chrome-store-link.js" %}"
type="application/javascript"></script>
{% if use_js %}
diff --git a/talerbank/app/views.py b/talerbank/app/views.py
index 92c8c8a..0c19dd3 100644
--- a/talerbank/app/views.py
+++ b/talerbank/app/views.py
@@ -105,6 +105,8 @@ def profile_page(request):
just_registered=just_registered,
use_js=use_js,
)
+ if settings.TALER_SUGGESTED_EXCHANGE:
+ context["suggested_exchange"] = settings.TALER_SUGGESTED_EXCHANGE
response = render(request, "profile_page.html", context)
if just_withdrawn and not use_js:
@@ -329,6 +331,8 @@ def withdraw_nojs(request):
response["X-Taler-Callback-Url"] = reverse("pin-question")
response["X-Taler-Wt-Types"] = '["TEST"]'
response["X-Taler-Amount"] = json.dumps(amount)
+ if settings.TALER_SUGGESTED_EXCHANGE:
+ response["X-Taler-Suggested-Exchange"] =
settings.TALER_SUGGESTED_EXCHANGE
return response
diff --git a/talerbank/settings_base.py b/talerbank/settings_base.py
index b97b021..979a04c 100644
--- a/talerbank/settings_base.py
+++ b/talerbank/settings_base.py
@@ -176,5 +176,6 @@ TALER_CURRENCY = tc.value_string("taler", "currency",
required=True)
TALER_DIGITS = 2
TALER_PREDEFINED_ACCOUNTS = ['Tor', 'GNUnet', 'Taler', 'FSF', 'Tutorial']
TALER_EXPECTS_DONATIONS = ['Tor', 'GNUnet', 'Taler', 'FSF']
+TALER_SUGGESTED_EXCHANGE = tc.value_string("bank", "suggested_exchange")
logging.info("currency: '%s'", TALER_CURRENCY)
--
To stop receiving notification emails like this one, please contact
address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [taler-bank] branch master updated: suggest exchange to wallet,
gnunet <=