Fix get_public_key not working when using bunker and logged in a different account from the client

This commit is contained in:
greenart7c3
2025-05-09 09:39:24 -03:00
parent 95244752d7
commit e7d91d1c0e
@@ -423,7 +423,8 @@ class SignerProvider : ContentProvider() {
"content://$appId.GET_PUBLIC_KEY" -> {
val packageName = callingPackage ?: return null
val account = LocalPreferences.loadFromEncryptedStorageSync(context!!) ?: return null
val npub = if (projection != null && projection.size >= 3) IntentUtils.parsePubKey(projection[2]) else null
val account = LocalPreferences.loadFromEncryptedStorageSync(context!!, npub) ?: return null
val database = Amber.instance.getDatabase(account.npub)
val permission =
database