Skip to content

Commit 36420e9

Browse files
committed
fix: has external peers check
1 parent 33c485b commit 36420e9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/src/main/java/to/bitkit/services/LightningService.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ import javax.inject.Singleton
5959
import kotlin.io.path.Path
6060
import kotlin.time.Duration
6161
import kotlin.time.Duration.Companion.seconds
62+
import kotlin.toString
6263

6364
typealias NodeEventHandler = suspend (Event) -> Unit
6465

@@ -325,7 +326,7 @@ class LightningService @Inject constructor(
325326
return lspPeers
326327
}
327328

328-
fun hasExternalPeers() = peers?.any { it !in getLspPeers() } == true
329+
fun hasExternalPeers() = peers?.any { p -> p.toString() !in getLspPeers().map { it.toString() } } == true
329330

330331
// endregion
331332

0 commit comments

Comments
 (0)