Skip to content

Commit d19cf4c

Browse files
committed
chore: formatting
1 parent 8e7562e commit d19cf4c

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

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

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -107,12 +107,13 @@ class TransferRepo @Inject constructor(
107107
transfer: TransferEntity,
108108
channels: List<ChannelDetails>,
109109
): String? {
110-
transfer.lspOrderId?.let { orderId ->
111-
val order = blocktankRepo.getOrder(orderId, refresh = false).getOrNull()
112-
val fundingTxId = order?.channel?.fundingTx?.id ?: return null
113-
return channels.find { it.fundingTxo?.txid == fundingTxId }?.channelId
114-
}
115-
return transfer.channelId
110+
return transfer.lspOrderId
111+
?.let { orderId ->
112+
val order = blocktankRepo.getOrder(orderId, refresh = false).getOrNull()
113+
val fundingTxId = order?.channel?.fundingTx?.id ?: return null
114+
return@let channels.find { it.fundingTxo?.txid == fundingTxId }?.channelId
115+
}
116+
?: transfer.channelId
116117
}
117118

118119
companion object {

docs/transfer.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,7 @@ Transfers are serialized to JSON and included in backup. Restore deserializes an
453453
- mine: `./bitcoin-cli mine 1`
454454
- **expect:** activity: entry CONFIRMED
455455

456-
[external-node-channel]: https://github.com/ovitrif/bitkit-docker#external-node-channel
456+
[^1]: Currently we can't display the channel closure transactions as 'transfer' yet in the activity list, due to an api missing in ldk-node. See comment in [ldk-node/wallet/mod.rs#L728-L738][ldk-node-comment]
457457
458-
[^1]: Currently we can't display the channel closure transactions as 'transfer' yet in the activity list, due to an api missing in ldk-node. See comment in [ldk-node/wallet/mod.rs](https://github.com/lightningdevkit/ldk-node/blob/22a5d7742cf4e9265173ae51106db4bd9668ec8a/src/wallet/mod.rs#L728-L738)
458+
[external-node-channel]: https://github.com/ovitrif/bitkit-docker#external-node-channel
459+
[ldk-node-comment]: https://github.com/lightningdevkit/ldk-node/blob/22a5d7742cf4e9265173ae51106db4bd9668ec8a/src/wallet/mod.rs#L728-L738

0 commit comments

Comments
 (0)