Skip to content

Commit 2830f80

Browse files
committed
fix: use short channel id
1 parent 6e4d37b commit 2830f80

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

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

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,10 @@ class BlocktankRepo @Inject constructor(
101101
return@withContext runCatching {
102102
val channel = lightningService.channels?.find { it.channelId == channelId }
103103

104-
getOrders(
105-
orderIds = null,
106-
filter = null,
107-
refresh = true
108-
).any { order -> order.channel?.shortChannelId == channel?.shortChannelId.toString() }
104+
_blocktankState.value.cjitEntries.any { order ->
105+
order.channel?.shortChannelId?.toULongOrNull() == channel?.shortChannelId &&
106+
channel?.shortChannelId != null
107+
}
109108
}.getOrDefault(false)
110109
}
111110

0 commit comments

Comments
 (0)