gnunet-svn
[Top][All Lists]
Advanced

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

[taler-wallet-android] branch master updated (9a707c2 -> b666242)


From: gnunet
Subject: [taler-wallet-android] branch master updated (9a707c2 -> b666242)
Date: Thu, 05 Mar 2020 17:44:06 +0100

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

torsten-grote pushed a change to branch master
in repository wallet-android.

    from 9a707c2  Add wallet to nightly F-Droid repo
     new 9c7f53f  Download binary deps before building on CI
     new b666242  Don't restart withdrawal process after accepting ToS

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .gitlab-ci.yml                                     |  6 ++++++
 .../java/net/taler/wallet/history/WalletHistory.kt |  4 ++--
 .../net/taler/wallet/withdraw/WithdrawManager.kt   | 25 ++++++++++++++++------
 build.gradle                                       |  2 +-
 4 files changed, 27 insertions(+), 10 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index f4bfc45..3cdba25 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -9,6 +9,12 @@ stages:
   - test
   - deploy
 
+default:
+  before_script:
+    - wget 
https://git.taler.net/wallet-android.git/plain/akono.aar?h=binary-deps -O 
akono/akono.aar
+    - mkdir -p app/src/main/assets
+    - wget 
https://git.taler.net/wallet-android.git/plain/taler-wallet-android.js?h=binary-deps
 -O app/src/main/assets/taler-wallet-android.js
+
 test:
   stage: test
   script: ./gradlew lint assembleRelease
diff --git a/app/src/main/java/net/taler/wallet/history/WalletHistory.kt 
b/app/src/main/java/net/taler/wallet/history/WalletHistory.kt
index 76b11ea..bb37ffa 100644
--- a/app/src/main/java/net/taler/wallet/history/WalletHistory.kt
+++ b/app/src/main/java/net/taler/wallet/history/WalletHistory.kt
@@ -95,10 +95,10 @@ class WalletHistory : Fragment(), OnEventClickListener {
             addItemDecoration(myItemDecoration)
         }
 
-        model.historyProgress.observe(this, Observer { show ->
+        model.historyProgress.observe(viewLifecycleOwner, Observer { show ->
             historyProgressBar.visibility = if (show) VISIBLE else INVISIBLE
         })
-        model.history.observe(this, Observer { history ->
+        model.history.observe(viewLifecycleOwner, Observer { history ->
             historyEmptyState.visibility = if (history.isEmpty()) VISIBLE else 
INVISIBLE
             historyAdapter.update(history)
         })
diff --git a/app/src/main/java/net/taler/wallet/withdraw/WithdrawManager.kt 
b/app/src/main/java/net/taler/wallet/withdraw/WithdrawManager.kt
index dec03af..8179d8d 100644
--- a/app/src/main/java/net/taler/wallet/withdraw/WithdrawManager.kt
+++ b/app/src/main/java/net/taler/wallet/withdraw/WithdrawManager.kt
@@ -30,7 +30,9 @@ sealed class WithdrawStatus {
         val talerWithdrawUri: String,
         val exchangeBaseUrl: String,
         val tosText: String,
-        val tosEtag: String
+        val tosEtag: String,
+        val amount: Amount,
+        val suggestedExchange: String
     ) : WithdrawStatus()
 
     object Success : WithdrawStatus()
@@ -115,8 +117,13 @@ class WithdrawManager(private val walletBackendApi: 
WalletBackendApi) {
                 Log.v(TAG, "ignoring withdrawal info result, not loading.")
                 return@sendRequest
             }
+            val wi = result.getJSONObject("bankWithdrawDetails")
+            val suggestedExchange = wi.getString("suggestedExchange")
+            val amount = Amount.fromJson(wi.getJSONObject("amount"))
+
             val ei = result.getJSONObject("exchangeWithdrawDetails")
             val termsOfServiceAccepted = 
ei.getBoolean("termsOfServiceAccepted")
+
             if (!termsOfServiceAccepted) {
                 val exchange = ei.getJSONObject("exchangeInfo")
                 val tosText = exchange.getString("termsOfServiceText")
@@ -126,13 +133,12 @@ class WithdrawManager(private val walletBackendApi: 
WalletBackendApi) {
                         status.talerWithdrawUri,
                         selectedExchange,
                         tosText,
-                        tosEtag
+                        tosEtag,
+                        amount,
+                        suggestedExchange
                     )
                 )
             } else {
-                val wi = result.getJSONObject("bankWithdrawDetails")
-                val suggestedExchange = wi.getString("suggestedExchange")
-                val amount = Amount.fromJson(wi.getJSONObject("amount"))
                 withdrawStatus.postValue(
                     WithdrawStatus.ReceivedDetails(
                         status.talerWithdrawUri,
@@ -178,8 +184,13 @@ class WithdrawManager(private val walletBackendApi: 
WalletBackendApi) {
                     if (isError) {
                         return@sendRequest
                     }
-                    // Try withdrawing again with accepted ToS
-                    getWithdrawalInfo(s.talerWithdrawUri)
+                    withdrawStatus.postValue(
+                        WithdrawStatus.ReceivedDetails(
+                            s.talerWithdrawUri,
+                            s.amount,
+                            s.suggestedExchange
+                        )
+                    )
                 }
             }
         }
diff --git a/build.gradle b/build.gradle
index a9d913c..ee7840e 100644
--- a/build.gradle
+++ b/build.gradle
@@ -15,7 +15,7 @@
  */
 
 buildscript {
-    ext.kotlin_version = '1.3.61'
+    ext.kotlin_version = '1.3.70'
     repositories {
         google()
         jcenter()

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



reply via email to

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