|
|
|
@ -249,19 +249,38 @@ Pane { |
|
|
|
text: qsTr('Lightning Routing') |
|
|
|
text: qsTr('Lightning Routing') |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
ElComboBox { |
|
|
|
RowLayout { |
|
|
|
id: lnRoutingType |
|
|
|
Layout.columnSpan: 2 |
|
|
|
enabled: Daemon.currentWallet && Daemon.currentWallet.isLightning |
|
|
|
Layout.fillWidth: true |
|
|
|
|
|
|
|
Layout.leftMargin: -constants.paddingSmall |
|
|
|
valueRole: 'key' |
|
|
|
spacing: 0 |
|
|
|
textRole: 'label' |
|
|
|
Switch { |
|
|
|
model: ListModel { |
|
|
|
id: useTrampolineRouting |
|
|
|
ListElement { key: 'gossip'; label: qsTr('Gossip') } |
|
|
|
onCheckedChanged: { |
|
|
|
ListElement { key: 'trampoline'; label: qsTr('Trampoline') } |
|
|
|
if (activeFocus) { |
|
|
|
|
|
|
|
if (!checked) { |
|
|
|
|
|
|
|
var dialog = app.messageDialog.createObject(app, { |
|
|
|
|
|
|
|
text: qsTr('Using plain gossip mode is not recommended. Are you sure?'), |
|
|
|
|
|
|
|
yesno: true |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
dialog.yesClicked.connect(function() { |
|
|
|
|
|
|
|
Config.useGossip = true |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
dialog.noClicked.connect(function() { |
|
|
|
|
|
|
|
checked = true // revert |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
dialog.open() |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
Config.useGossip = !checked |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
onCurrentValueChanged: { |
|
|
|
Label { |
|
|
|
if (activeFocus) |
|
|
|
Layout.fillWidth: true |
|
|
|
Config.useGossip = currentValue == 'gossip' |
|
|
|
text: qsTr('Trampoline routing') |
|
|
|
|
|
|
|
wrapMode: Text.Wrap |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -347,7 +366,7 @@ Pane { |
|
|
|
rateSources.currentIndex = rateSources.indexOfValue(Daemon.fx.rateSource) |
|
|
|
rateSources.currentIndex = rateSources.indexOfValue(Daemon.fx.rateSource) |
|
|
|
fiatEnable.checked = Daemon.fx.enabled |
|
|
|
fiatEnable.checked = Daemon.fx.enabled |
|
|
|
spendUnconfirmed.checked = Config.spendUnconfirmed |
|
|
|
spendUnconfirmed.checked = Config.spendUnconfirmed |
|
|
|
lnRoutingType.currentIndex = Config.useGossip ? 0 : 1 |
|
|
|
useTrampolineRouting.checked = !Config.useGossip |
|
|
|
useFallbackAddress.checked = Config.useFallbackAddress |
|
|
|
useFallbackAddress.checked = Config.useFallbackAddress |
|
|
|
enableDebugLogs.checked = Config.enableDebugLogs |
|
|
|
enableDebugLogs.checked = Config.enableDebugLogs |
|
|
|
useRecoverableChannels.checked = Config.useRecoverableChannels |
|
|
|
useRecoverableChannels.checked = Config.useRecoverableChannels |
|
|
|
|