Skip to content

Commit f9aa8ca

Browse files
committed
feat: filter orders for node Id
1 parent 2830f80 commit f9aa8ca

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import com.synonym.bitkitcore.IBtEstimateFeeResponse2
77
import com.synonym.bitkitcore.IBtInfo
88
import com.synonym.bitkitcore.IBtOrder
99
import com.synonym.bitkitcore.IcJitEntry
10-
import com.synonym.bitkitcore.getOrders
1110
import kotlinx.coroutines.CoroutineDispatcher
1211
import kotlinx.coroutines.CoroutineScope
1312
import kotlinx.coroutines.SupervisorJob
@@ -100,10 +99,8 @@ class BlocktankRepo @Inject constructor(
10099
suspend fun isCjitOrder(channelId: String): Boolean = withContext(bgDispatcher) {
101100
return@withContext runCatching {
102101
val channel = lightningService.channels?.find { it.channelId == channelId }
103-
104102
_blocktankState.value.cjitEntries.any { order ->
105-
order.channel?.shortChannelId?.toULongOrNull() == channel?.shortChannelId &&
106-
channel?.shortChannelId != null
103+
order.lspNode.pubkey == channel?.counterpartyNodeId
107104
}
108105
}.getOrDefault(false)
109106
}

0 commit comments

Comments
 (0)