Moves EmptyNostrClient to a class to avoid auto-import issues
This commit is contained in:
+1
-1
@@ -87,7 +87,7 @@ interface INostrClient : AutoCloseable {
|
||||
fun activeOutboxCache(url: NormalizedRelayUrl): Set<HexKey>
|
||||
}
|
||||
|
||||
object EmptyNostrClient : INostrClient {
|
||||
class EmptyNostrClient : INostrClient {
|
||||
override fun connectedRelaysFlow() = MutableStateFlow(emptySet<NormalizedRelayUrl>())
|
||||
|
||||
override fun availableRelaysFlow() = MutableStateFlow(emptySet<NormalizedRelayUrl>())
|
||||
|
||||
-2
@@ -21,8 +21,6 @@
|
||||
package com.vitorpamplona.quartz.nip01Core.relay.client.accessories
|
||||
|
||||
import com.vitorpamplona.quartz.nip01Core.core.Event
|
||||
import com.vitorpamplona.quartz.nip01Core.relay.client.EmptyNostrClient.close
|
||||
import com.vitorpamplona.quartz.nip01Core.relay.client.EmptyNostrClient.openReqSubscription
|
||||
import com.vitorpamplona.quartz.nip01Core.relay.client.INostrClient
|
||||
import com.vitorpamplona.quartz.nip01Core.relay.client.reqs.IRequestListener
|
||||
import com.vitorpamplona.quartz.nip01Core.relay.client.single.newSubId
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@ class ConvertExceptionsTest {
|
||||
NostrSignerRemote.fromBunkerUri(
|
||||
"bunker://${"a".repeat(64)}?relay=wss://r.com",
|
||||
NostrSignerInternal(KeyPair()),
|
||||
EmptyNostrClient,
|
||||
EmptyNostrClient(),
|
||||
)
|
||||
|
||||
@Test
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@ import kotlin.test.assertNull
|
||||
|
||||
class FromBunkerUriTest {
|
||||
private val signer = NostrSignerInternal(KeyPair())
|
||||
private val client = EmptyNostrClient
|
||||
private val client = EmptyNostrClient()
|
||||
private val validHex = "a".repeat(64)
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user