Skip to content

Commit

Permalink
fix: channel file name
Browse files Browse the repository at this point in the history
  • Loading branch information
Jasonvdb committed Aug 22, 2024
1 parent ec9907b commit 36be24a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import java.io.File

class LdkPersister {
fun handleChannel(channelFundingOutpoint: OutPoint, data: ChannelMonitor, update_id: MonitorUpdateId): ChannelMonitorUpdateStatus {
val channelId = channelFundingOutpoint._txid.hexEncodedString()
val channelId = data.channel_id()._a.hexEncodedString()
val body = Arguments.createMap()
body.putString("channel_id", channelId)
body.putHexString("counterparty_node_id", data._counterparty_node_id)
Expand Down
4 changes: 2 additions & 2 deletions lib/ios/Classes/LdkPersist.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ import LightningDevKit

class LdkPersister: Persist {
private func handleChannel(_ channelFundingOutpoint: Bindings.OutPoint, _ data: ChannelMonitor, _ updateId: Bindings.MonitorUpdateId) -> ChannelMonitorUpdateStatus {
guard let txId = channelFundingOutpoint.getTxid() else {
guard let channelId = data.channelId().getA() else {
LdkEventEmitter.shared.send(withEvent: .native_log, body: "Error. Missing channelFundingOutpoint.getTxid(). Cannot persist channel")
return .UnrecoverableError
}

let channelIdHex = Data(txId).hexEncodedString()
let channelIdHex = Data(channelId).hexEncodedString()
let body = [
"channel_id": channelIdHex,
"counterparty_node_id": Data(data.getCounterpartyNodeId() ?? []).hexEncodedString()
Expand Down

0 comments on commit 36be24a

Please sign in to comment.