From 9fde8f6b9c0196dd8134c5b95eab6457fc9d8a7e Mon Sep 17 00:00:00 2001 From: greenart7c3 Date: Wed, 13 Nov 2024 15:52:17 -0300 Subject: [PATCH] Move bunker log down --- .../nostrsigner/service/EventNotificationConsumer.kt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/com/greenart7c3/nostrsigner/service/EventNotificationConsumer.kt b/app/src/main/java/com/greenart7c3/nostrsigner/service/EventNotificationConsumer.kt index 137c9b9f..83a187e8 100644 --- a/app/src/main/java/com/greenart7c3/nostrsigner/service/EventNotificationConsumer.kt +++ b/app/src/main/java/com/greenart7c3/nostrsigner/service/EventNotificationConsumer.kt @@ -83,16 +83,16 @@ class EventNotificationConsumer(private val applicationContext: Context) { request: String, encryptionType: EncryptionType, ) { - if (BuildConfig.DEBUG) { - Log.d("bunker", event.toJson()) - Log.d("bunker", request) - } - val dao = NostrSigner.getInstance().getDatabase(acc.signer.keyPair.pubKey.toNpub()).applicationDao() val notification = dao.getNotification(event.id) if (notification != null) return dao.insertNotification(NotificationEntity(0, event.id(), event.createdAt)) + if (BuildConfig.DEBUG) { + Log.d("bunker", event.toJson()) + Log.d("bunker", request) + } + val bunkerRequest = BunkerRequest.mapper.readValue(request, BunkerRequest::class.java) bunkerRequest.localKey = event.pubKey bunkerRequest.currentAccount = acc.signer.keyPair.pubKey.toNpub()