diff --git a/public/i18n/en.json b/public/i18n/en.json
index 0be8c26b..bc7065dc 100644
--- a/public/i18n/en.json
+++ b/public/i18n/en.json
@@ -343,7 +343,8 @@
"close_channel": "Close",
"online_channels": "Online Channels",
"offline_channels": "Offline Channels",
- "close_channel_confirm": "Closing this channel will move the balance on-chain and incur an on-chain fee."
+ "close_channel_confirm": "Closing this channel will move the balance on-chain and incur an on-chain fee.",
+ "force_close_channel_confirm": "This channel is offline. Force closing this channel will move the balance on-chain, incur an on-chain fee, and may take a few days to settle."
},
"connections": {
"title": "Wallet Connections",
diff --git a/src/routes/settings/Channels.tsx b/src/routes/settings/Channels.tsx
index 6e5b34d6..6e674084 100644
--- a/src/routes/settings/Channels.tsx
+++ b/src/routes/settings/Channels.tsx
@@ -98,7 +98,7 @@ function splitChannelNumbers(channel: MutinyChannel): {
};
}
-function SingleChannelItem(props: { channel: MutinyChannel }) {
+function SingleChannelItem(props: { channel: MutinyChannel; online: boolean }) {
const i18n = useI18n();
const [state, _actions] = useMegaStore();
const network = state.mutiny_wallet?.get_network() as Network;
@@ -114,9 +114,10 @@ function SingleChannelItem(props: { channel: MutinyChannel }) {
try {
if (!props.channel.outpoint) return;
setConfirmLoading(true);
+ const forceClose = !props.online;
await state.mutiny_wallet?.close_channel(
props.channel.outpoint,
- false,
+ forceClose,
false
);
} catch (e) {
@@ -161,7 +162,16 @@ function SingleChannelItem(props: { channel: MutinyChannel }) {
onConfirm={closeChannel}
onCancel={() => setConfirmOpen(false)}
>
- {i18n.t("settings.channels.close_channel_confirm")}
+
+
+ {i18n.t(
+ "settings.channels.force_close_channel_confirm"
+ )}
+
+
+ {i18n.t("settings.channels.close_channel_confirm")}
+
+
@@ -259,6 +269,7 @@ function LiquidityMonitor() {
{(channel) => (
)}
@@ -279,6 +290,7 @@ function LiquidityMonitor() {
{(channel) => (
)}