diff options
author | Sebastian <sebasjm@gmail.com> | 2021-11-29 00:51:51 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2021-11-29 00:51:51 -0300 |
commit | 5476ac27b671e51aceb51e4574b70730f7f0f2f3 (patch) | |
tree | 0f939ec23f0f9755b0e26cc19e36956bdb3c4393 /wallet/src/main/java/net/taler/wallet/withdraw/TosSection.kt | |
parent | 043551891f3879aa04aa9d8e4b76fcbd8fe8365d (diff) | |
download | taler-android-5476ac27b671e51aceb51e4574b70730f7f0f2f3.tar.gz taler-android-5476ac27b671e51aceb51e4574b70730f7f0f2f3.tar.bz2 taler-android-5476ac27b671e51aceb51e4574b70730f7f0f2f3.zip |
show 'accept tos' when there is no ToS
Diffstat (limited to 'wallet/src/main/java/net/taler/wallet/withdraw/TosSection.kt')
-rw-r--r-- | wallet/src/main/java/net/taler/wallet/withdraw/TosSection.kt | 5 |
1 files changed, 3 insertions, 2 deletions
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 ) |