diff --git a/app/src/main/java/com/vitorpamplona/amethyst/service/NostrAccountDataSource.kt b/app/src/main/java/com/vitorpamplona/amethyst/service/NostrAccountDataSource.kt index ac4c5dc86..9ce1400ac 100644 --- a/app/src/main/java/com/vitorpamplona/amethyst/service/NostrAccountDataSource.kt +++ b/app/src/main/java/com/vitorpamplona/amethyst/service/NostrAccountDataSource.kt @@ -127,7 +127,7 @@ object NostrAccountDataSource : NostrDataSource("AccountData") { override fun consume(event: Event, relay: Relay) { if (LocalCache.justVerify(event)) { if (event is GiftWrapEvent) { - val privateKey = NostrChatroomListDataSource.account.keyPair.privKey + val privateKey = account.keyPair.privKey if (privateKey != null) { event.cachedGift(privateKey)?.let { this.consume(it, relay) @@ -136,7 +136,7 @@ object NostrAccountDataSource : NostrDataSource("AccountData") { } if (event is SealedGossipEvent) { - val privateKey = NostrChatroomListDataSource.account.keyPair.privKey + val privateKey = account.keyPair.privKey if (privateKey != null) { event.cachedGossip(privateKey)?.let { LocalCache.justConsume(it, relay)