[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-taler-android] branch master updated: show 'accept tos' when ther
From: |
gnunet |
Subject: |
[taler-taler-android] branch master updated: show 'accept tos' when there is no ToS |
Date: |
Mon, 29 Nov 2021 04:52:00 +0100 |
This is an automated email from the git hooks/post-receive script.
sebasjm pushed a commit to branch master
in repository taler-android.
The following commit(s) were added to refs/heads/master by this push:
new 5476ac2 show 'accept tos' when there is no ToS
5476ac2 is described below
commit 5476ac27b671e51aceb51e4574b70730f7f0f2f3
Author: Sebastian <sebasjm@gmail.com>
AuthorDate: Mon Nov 29 00:51:51 2021 -0300
show 'accept tos' when there is no ToS
---
.../main/java/net/taler/wallet/withdraw/ReviewExchangeTosFragment.kt | 3 ++-
wallet/src/main/java/net/taler/wallet/withdraw/TosSection.kt | 5 +++--
wallet/src/main/java/net/taler/wallet/withdraw/WithdrawManager.kt | 2 +-
3 files changed, 6 insertions(+), 4 deletions(-)
diff --git
a/wallet/src/main/java/net/taler/wallet/withdraw/ReviewExchangeTosFragment.kt
b/wallet/src/main/java/net/taler/wallet/withdraw/ReviewExchangeTosFragment.kt
index 73fe760..e3c5da6 100644
---
a/wallet/src/main/java/net/taler/wallet/withdraw/ReviewExchangeTosFragment.kt
+++
b/wallet/src/main/java/net/taler/wallet/withdraw/ReviewExchangeTosFragment.kt
@@ -87,7 +87,8 @@ class ReviewExchangeTosFragment : Fragment() {
private fun onTosError(msg: String) {
ui.tosList.fadeIn()
ui.progressBar.fadeOut()
- ui.buttonCard.fadeOut()
+ ui.acceptTosCheckBox.fadeIn()
+ // ui.buttonCard.fadeOut()
ui.errorView.text = getString(R.string.exchange_tos_error, "\n\n$msg")
ui.errorView.fadeIn()
}
diff --git a/wallet/src/main/java/net/taler/wallet/withdraw/TosSection.kt
b/wallet/src/main/java/net/taler/wallet/withdraw/TosSection.kt
index b198478..64dff8a 100644
--- a/wallet/src/main/java/net/taler/wallet/withdraw/TosSection.kt
+++ b/wallet/src/main/java/net/taler/wallet/withdraw/TosSection.kt
@@ -16,6 +16,7 @@
package net.taler.wallet.withdraw
+import android.util.Log
import io.noties.markwon.Markwon
import kotlinx.serialization.Serializable
import org.commonmark.node.Code
@@ -50,7 +51,7 @@ internal fun parseTos(markwon: Markwon, text: String):
List<TosSection> {
lastHeading = getNodeText(node)
if (lastHeading.isBlank()) throw ParseException("Empty heading", 0)
} else if (lastHeading == null) {
- throw ParseException("Found text before first primary heading", 0)
+ throw ParseException("The exchange ToS does not follow the correct
format", 0)
} else {
section.appendChild(node)
}
@@ -77,6 +78,6 @@ private fun getNodeText(rootNode: Node): String {
@Serializable
data class TosResponse(
- val tos: String,
+ val content: String,
val currentEtag: String
)
diff --git a/wallet/src/main/java/net/taler/wallet/withdraw/WithdrawManager.kt
b/wallet/src/main/java/net/taler/wallet/withdraw/WithdrawManager.kt
index 5afb125..cc4c057 100644
--- a/wallet/src/main/java/net/taler/wallet/withdraw/WithdrawManager.kt
+++ b/wallet/src/main/java/net/taler/wallet/withdraw/WithdrawManager.kt
@@ -167,7 +167,7 @@ class WithdrawManager(
exchangeBaseUrl = exchangeBaseUrl,
amountRaw = details.amountRaw,
amountEffective = details.amountEffective,
- tosText = it.tos,
+ tosText = it.content,
tosEtag = it.currentEtag,
showImmediately = showImmediately.toEvent(),
)
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-taler-android] branch master updated: show 'accept tos' when there is no ToS,
gnunet <=