From b72ac7f07fb8e90bc16e5168b6761a42e5947516 Mon Sep 17 00:00:00 2001 From: Lucas Soriano del Pino Date: Sat, 27 Jan 2024 21:35:53 +1100 Subject: [PATCH 1/2] Update Cargo.lock after release Been there, done that. --- Cargo.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index 2a17e1b3b..79a16f821 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -827,7 +827,7 @@ dependencies = [ [[package]] name = "coordinator" -version = "1.8.2" +version = "1.8.3" dependencies = [ "anyhow", "atty", From 5769525d19c8dddc48d655e5edd3fa5fd6f1ce46 Mon Sep 17 00:00:00 2001 From: Lucas Soriano del Pino Date: Sat, 27 Jan 2024 21:36:12 +1100 Subject: [PATCH 2/2] fix(app): Map SignedChannelState to ChannelStatus correctly I think it's correct to assume that a `Established` channel is one that has a position. But a `RenewFinalized` channel is still pending completion of the renew protocol and will eventually transition back to `Established`. This behaviour can be seen in our `can_open_and_settle_offchain` test in the `ln-dlc-node` crate. --- mobile/native/src/ln_dlc/channel_status.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/mobile/native/src/ln_dlc/channel_status.rs b/mobile/native/src/ln_dlc/channel_status.rs index bccd9cb2b..2540a05f9 100644 --- a/mobile/native/src/ln_dlc/channel_status.rs +++ b/mobile/native/src/ln_dlc/channel_status.rs @@ -80,16 +80,15 @@ impl From> for ChannelStatus { None => Self::NotOpen, Some(channel) => match channel.state { SignedChannelState::Established { .. } => Self::WithPosition, - SignedChannelState::Settled { .. } | SignedChannelState::RenewFinalized { .. } => { - Self::Open - } + SignedChannelState::Settled { .. } => Self::Open, SignedChannelState::SettledOffered { .. } | SignedChannelState::SettledReceived { .. } | SignedChannelState::SettledAccepted { .. } | SignedChannelState::SettledConfirmed { .. } => Self::Settling, SignedChannelState::RenewOffered { .. } | SignedChannelState::RenewAccepted { .. } - | SignedChannelState::RenewConfirmed { .. } => Self::Renewing, + | SignedChannelState::RenewConfirmed { .. } + | SignedChannelState::RenewFinalized { .. } => Self::Renewing, SignedChannelState::Closing { .. } | SignedChannelState::CollaborativeCloseOffered { .. } => Self::Closing, },