1
0

submarine_swaps: implement swaps-over-nostr for qml

This commit is contained in:
Sander van Grieken
2024-11-15 02:13:38 +01:00
committed by ThomasV
parent 22995b4a34
commit 993a575b7f
7 changed files with 495 additions and 110 deletions

View File

@@ -436,9 +436,18 @@ ApplicationWindow
}
}
property alias nostrSwapServersDialog: _nostrSwapServersDialog
Component {
id: _nostrSwapServersDialog
NostrSwapServersDialog {
onClosed: destroy()
}
}
Component {
id: swapDialog
SwapDialog {
id: _swapdialog
onClosed: destroy()
swaphelper: SwapHelper {
id: _swaphelper
@@ -454,6 +463,20 @@ ApplicationWindow
})
dialog.open()
}
onUndefinedNPub: {
var dialog = app.nostrSwapServersDialog.createObject(app, {
swaphelper: _swaphelper,
selectedPubkey: Config.swapServerNPub
})
dialog.accepted.connect(function() {
Config.swapServerNPub = dialog.selectedPubkey
_swaphelper.init_swap_manager()
})
dialog.rejected.connect(function() {
_swaphelper.npubSelectionCancelled()
})
dialog.open()
}
}
}
}