Adds an extra catch in case there is a decryption error
This commit is contained in:
+5
@@ -83,6 +83,7 @@ class AppSpecificState(
|
|||||||
scope.launch(Dispatchers.Default) {
|
scope.launch(Dispatchers.Default) {
|
||||||
Log.d("AccountRegisterObservers", "AppSpecificData Collector Start")
|
Log.d("AccountRegisterObservers", "AppSpecificData Collector Start")
|
||||||
getAppSpecificDataFlow().collect {
|
getAppSpecificDataFlow().collect {
|
||||||
|
try {
|
||||||
Log.d("AccountRegisterObservers", "Updating AppSpecificData for ${signer.pubKey}")
|
Log.d("AccountRegisterObservers", "Updating AppSpecificData for ${signer.pubKey}")
|
||||||
(it.note.event as? AppSpecificDataEvent)?.let {
|
(it.note.event as? AppSpecificDataEvent)?.let {
|
||||||
val decrypted = signer.decrypt(it.content, it.pubKey)
|
val decrypted = signer.decrypt(it.content, it.pubKey)
|
||||||
@@ -94,6 +95,10 @@ class AppSpecificState(
|
|||||||
Log.w("LocalPreferences", "Error Decoding latestAppSpecificData from Preferences with value $decrypted", e)
|
Log.w("LocalPreferences", "Error Decoding latestAppSpecificData from Preferences with value $decrypted", e)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} catch (e: Throwable) {
|
||||||
|
if (e is CancellationException) throw e
|
||||||
|
Log.w("LocalPreferences", "Error Decrypting latestAppSpecificData from Preferences", e)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user