diff --git a/electrum/gui/qml/components/ChannelDetails.qml b/electrum/gui/qml/components/ChannelDetails.qml index dbe81e152..e2b2ee060 100644 --- a/electrum/gui/qml/components/ChannelDetails.qml +++ b/electrum/gui/qml/components/ChannelDetails.qml @@ -135,9 +135,10 @@ Pane { icon.source: '../../icons/share.png' icon.color: 'transparent' onClicked: { - var dialog = app.genericShareDialog.createObject(root, - { title: qsTr('Channel node ID'), text: channeldetails.pubkey } - ) + var dialog = app.genericShareDialog.createObject(root, { + title: qsTr('Channel node ID'), + text: channeldetails.pubkey + }) dialog.open() } } @@ -159,6 +160,18 @@ Pane { columns: 2 rowSpacing: constants.paddingSmall + InfoTextArea { + Layout.columnSpan: 2 + Layout.fillWidth: true + Layout.bottomMargin: constants.paddingMedium + visible: channeldetails.canSend.msatsInt < 0.5 * channeldetails.localCapacity.msatsInt + && channeldetails.localCapacity.msatsInt > 0.2 * channeldetails.capacity.msatsInt + iconStyle: InfoTextArea.IconStyle.Warn + compact: true + text: [qsTr('The amount available for sending is considerably lower than the local balance.'), + qsTr('This can occur when mempool fees are high.')].join(' ') + } + ChannelBar { Layout.columnSpan: 2 Layout.fillWidth: true @@ -222,7 +235,7 @@ Pane { } Label { - text: qsTr('Can Receive') + text: qsTr('Can receive') color: Material.accentColor } @@ -324,6 +337,14 @@ Pane { id: channeldetails wallet: Daemon.currentWallet channelid: root.channelid + onTrampolineFrozenInGossipMode: { + var dialog = app.messageDialog.createObject(root, { + title: qsTr('Cannot unfreeze channel'), + text: [qsTr('Non-Trampoline channels cannot be used for sending while in trampoline mode.'), + qsTr('Disable trampoline mode to enable sending from this channel.')].join(' ') + }) + dialog.open() + } } Component { diff --git a/electrum/gui/qml/qechanneldetails.py b/electrum/gui/qml/qechanneldetails.py index 80d8851d8..5094f8c85 100644 --- a/electrum/gui/qml/qechanneldetails.py +++ b/electrum/gui/qml/qechanneldetails.py @@ -27,6 +27,7 @@ class QEChannelDetails(AuthMixin, QObject, QtEventListener): channelCloseSuccess = pyqtSignal() channelCloseFailed = pyqtSignal([str], arguments=['message']) isClosingChanged = pyqtSignal() + trampolineFrozenInGossipMode = pyqtSignal() def __init__(self, parent=None): super().__init__(parent) @@ -214,6 +215,7 @@ class QEChannelDetails(AuthMixin, QObject, QtEventListener): self.channelChanged.emit() else: self._logger.debug(messages.MSG_NON_TRAMPOLINE_CHANNEL_FROZEN_WITHOUT_GOSSIP) + self.trampolineFrozenInGossipMode.emit() @pyqtSlot() def freezeForReceiving(self):