From 000b1bb3b546639ae7f5bd34f491429e19f27379 Mon Sep 17 00:00:00 2001 From: Sander van Grieken Date: Mon, 19 May 2025 14:55:34 +0200 Subject: [PATCH] swaps: update instructions in manifest, add Max Forward and Max Reverse amounts in qml provider picker --- .../qml/components/NostrSwapServersDialog.qml | 41 ++++++++++++++++--- electrum/plugins/swapserver/manifest.json | 2 +- 2 files changed, 36 insertions(+), 7 deletions(-) diff --git a/electrum/gui/qml/components/NostrSwapServersDialog.qml b/electrum/gui/qml/components/NostrSwapServersDialog.qml index c6a90b3d7..b134b4f23 100644 --- a/electrum/gui/qml/components/NostrSwapServersDialog.qml +++ b/electrum/gui/qml/components/NostrSwapServersDialog.qml @@ -9,7 +9,7 @@ import "controls" ElDialog { id: dialog - title: qsTr("Select Swap Server") + title: qsTr("Select Swap Provider") property QtObject swaphelper @@ -78,11 +78,12 @@ ElDialog { Layout.preferredWidth: 1 } Image { - Layout.rowSpan: 3 + Layout.rowSpan: 5 + Layout.alignment: Qt.AlignTop source: Qt.resolvedUrl('../../icons/network.png') } Label { - text: qsTr('npub') + text: qsTr('Npub') color: Material.accentColor } Label { @@ -91,7 +92,7 @@ ElDialog { wrapMode: Text.Wrap } Label { - text: qsTr('fee') + text: qsTr('Fee') color: Material.accentColor } Label { @@ -99,13 +100,41 @@ ElDialog { text: model.percentage_fee + '% + ' + model.mining_fee + ' sat' } Label { - text: qsTr('last seen') + text: qsTr('Last seen') color: Material.accentColor } Label { Layout.fillWidth: true text: model.timestamp } + Label { + text: qsTr('Max Forward') + color: Material.accentColor + } + RowLayout{ + Layout.fillWidth: true + Label { + text: Config.formatSats(model.max_forward_amount) + } + Label { + text: Config.baseUnit + color: Material.accentColor + } + } + Label { + text: qsTr('Max Reverse') + color: Material.accentColor + } + RowLayout{ + Layout.fillWidth: true + Label { + text: Config.formatSats(model.max_reverse_amount) + } + Label { + text: Config.baseUnit + color: Material.accentColor + } + } Item { Layout.columnSpan: 3 Layout.preferredHeight: constants.paddingLarge @@ -122,7 +151,7 @@ ElDialog { width: listview.width * 4/5 font.pixelSize: constants.fontSizeXXLarge color: constants.mutedForeground - text: qsTr('No swap servers found') + text: qsTr('No swap providers found') wrapMode: Text.Wrap horizontalAlignment: Text.AlignHCenter } diff --git a/electrum/plugins/swapserver/manifest.json b/electrum/plugins/swapserver/manifest.json index 3bb60dd9b..1e691fd34 100644 --- a/electrum/plugins/swapserver/manifest.json +++ b/electrum/plugins/swapserver/manifest.json @@ -1,6 +1,6 @@ { "name": "swapserver", "fullname": "SwapServer", - "description": "Submarine swap server for an Electrum daemon.\n\nExample setup:\n\n electrum -o setconfig enable_plugin_swapserver True\n electrum -o setconfig swapserver_port 5455\n electrum daemon -v\n\n", + "description": "Submarine swap server for an Electrum daemon.\n\nExample setup:\n\n electrum -o setconfig plugins.swapserver.enabled True\n electrum -o setconfig plugins.swapserver.port 5455\n electrum daemon -v\n\n", "available_for": ["cmdline"] }