Skip to content

Commit

Permalink
feat(webapp): Add close txid on closed channels
Browse files Browse the repository at this point in the history
  • Loading branch information
holzeis committed Feb 28, 2024
1 parent e94d1c5 commit 0f03bd1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion webapp/src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -645,23 +645,25 @@ impl From<&dlc_manager::channel::Channel> for DlcChannel {
dlc_manager::channel::Channel::Closed(c) => DlcChannel {
dlc_channel_id: Some(c.channel_id.to_hex()),
channel_state: Some(ChannelState::Closed),
close_txid: Some(c.closing_txid.to_hex()),
..DlcChannel::default()
},
dlc_manager::channel::Channel::CounterClosed(c) => DlcChannel {
dlc_channel_id: Some(c.channel_id.to_hex()),
channel_state: Some(ChannelState::CounterClosed),
close_txid: Some(c.closing_txid.to_hex()),
..DlcChannel::default()
},
dlc_manager::channel::Channel::ClosedPunished(c) => DlcChannel {
dlc_channel_id: Some(c.channel_id.to_hex()),

channel_state: Some(ChannelState::ClosedPunished),
punnish_txid: Some(c.punish_txid.to_hex()),
..DlcChannel::default()
},
dlc_manager::channel::Channel::CollaborativelyClosed(c) => DlcChannel {
dlc_channel_id: Some(c.channel_id.to_hex()),
channel_state: Some(ChannelState::CollaborativelyClosed),
close_txid: Some(c.closing_txid.to_hex()),
..DlcChannel::default()
},
dlc_manager::channel::Channel::FailedAccept(_) => DlcChannel {
Expand Down

0 comments on commit 0f03bd1

Please sign in to comment.