diff --git a/mobile/native/src/channel_fee.rs b/mobile/native/src/channel_fee.rs index f425b019a..a29afc990 100644 --- a/mobile/native/src/channel_fee.rs +++ b/mobile/native/src/channel_fee.rs @@ -77,7 +77,7 @@ impl ChannelFeePaymentSubscriber { "Waiting for channel {} to be usable.", hex::encode(channel_id) ); - Handle::current().block_on(self.wait_for_usable_channel(channel_id)) + Handle::current().block_on(self.wait_for_outbound_capacity(channel_id)) })?; tracing::debug!("Trying to pay channel opening fees of {}", transaction.fee); @@ -148,7 +148,7 @@ impl ChannelFeePaymentSubscriber { .clone() } - async fn wait_for_usable_channel(&self, channel_id: ChannelId) -> Result<()> { + async fn wait_for_outbound_capacity(&self, channel_id: ChannelId) -> Result<()> { tokio::time::timeout(Duration::from_secs(5), async { loop { let channel_details = self @@ -156,12 +156,12 @@ impl ChannelFeePaymentSubscriber { .get_channel_details(&channel_id) .expect("Channel details to exist"); tracing::debug!("------> Channel Details: {:?}", channel_details); - if channel_details.is_usable { - tracing::debug!("Channel {} is usable", hex::encode(channel_id)); + if channel_details.outbound_capacity_msat > 0 { + tracing::debug!("Channel {} has outbound capacity", hex::encode(channel_id)); break; } else { tracing::debug!( - "Channel {} is not usable yet, waiting.", + "Channel {} does not have outbound capacity yet, waiting.", hex::encode(channel_id) ); tokio::time::sleep(Duration::from_millis(200)).await