Skip to content

Commit 81c6bbd

Browse files
committed
chore: remove wait for not running, because openChannel is already called in a pooling method
1 parent fcb5564 commit 81c6bbd

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

app/src/main/java/to/bitkit/repositories/BlocktankRepo.kt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ import kotlinx.coroutines.flow.update
3333
import kotlinx.coroutines.isActive
3434
import kotlinx.coroutines.launch
3535
import kotlinx.coroutines.withContext
36-
import kotlinx.coroutines.withTimeout
3736
import org.lightningdevkit.ldknode.ChannelDetails
3837
import to.bitkit.async.ServiceQueue
3938
import to.bitkit.data.CacheStore
@@ -53,7 +52,6 @@ import javax.inject.Named
5352
import javax.inject.Singleton
5453
import kotlin.math.ceil
5554
import kotlin.time.Duration
56-
import kotlin.time.Duration.Companion.minutes
5755
import kotlin.time.Duration.Companion.seconds
5856

5957
@Singleton
@@ -284,11 +282,6 @@ class BlocktankRepo @Inject constructor(
284282
suspend fun openChannel(orderId: String): Result<IBtOrder> = withContext(bgDispatcher) {
285283
try {
286284
Logger.debug("Opening channel for order: '$orderId'", context = TAG)
287-
288-
withTimeout(1.minutes) {
289-
lightningRepo.lightningState.first { it.nodeStatus?.isRunning ?: false }
290-
}
291-
292285
val order = coreService.blocktank.open(orderId)
293286

294287
// Update the order in state

0 commit comments

Comments
 (0)