gnunet-svn
[Top][All Lists]
Advanced

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

[taler-taler-android] 02/02: [wallet] Also log payload of wallet-core AP


From: gnunet
Subject: [taler-taler-android] 02/02: [wallet] Also log payload of wallet-core API requests
Date: Fri, 06 Jan 2023 17:24:08 +0100

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

torsten-grote pushed a commit to branch master
in repository taler-android.

commit a5d6420ddf5c161eee31b6b12622e399cc5fb7e5
Author: Torsten Grote <t@grobox.de>
AuthorDate: Fri Jan 6 13:24:01 2023 -0300

    [wallet] Also log payload of wallet-core API requests
---
 wallet/src/main/java/net/taler/wallet/backend/WalletBackendApi.kt | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/wallet/src/main/java/net/taler/wallet/backend/WalletBackendApi.kt 
b/wallet/src/main/java/net/taler/wallet/backend/WalletBackendApi.kt
index 76aceb2..b07b717 100644
--- a/wallet/src/main/java/net/taler/wallet/backend/WalletBackendApi.kt
+++ b/wallet/src/main/java/net/taler/wallet/backend/WalletBackendApi.kt
@@ -44,7 +44,7 @@ import kotlin.coroutines.suspendCoroutine
 
 class WalletBackendApi(
     private val app: Application,
-    private val notificationHandler: ((payload: JSONObject) -> Unit)
+    private val notificationHandler: ((payload: JSONObject) -> Unit),
 ) {
     private var walletBackendMessenger: Messenger? = null
     private val queuedMessages = LinkedList<Message>()
@@ -121,10 +121,10 @@ class WalletBackendApi(
     fun sendRequest(
         operation: String,
         args: JSONObject? = null,
-        onResponse: (isError: Boolean, message: JSONObject) -> Unit = { _, _ 
-> }
+        onResponse: (isError: Boolean, message: JSONObject) -> Unit = { _, _ 
-> },
     ) {
         val requestID = nextRequestID.incrementAndGet()
-        Log.i(TAG, "sending request for operation $operation ($requestID)")
+        Log.i(TAG, "sending request for operation $operation 
($requestID)\n${args?.toString(2)}")
         val msg = Message.obtain(null, MSG_COMMAND)
         handlers[requestID] = onResponse
         msg.replyTo = incomingMessenger
@@ -145,7 +145,7 @@ class WalletBackendApi(
     suspend inline fun <reified T> request(
         operation: String,
         serializer: KSerializer<T>? = null,
-        noinline args: (JSONObject.() -> JSONObject)? = null
+        noinline args: (JSONObject.() -> JSONObject)? = null,
     ): WalletResponse<T> = withContext(Dispatchers.Default) {
         suspendCoroutine { cont ->
             val json = Json {

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

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