submarine_swaps: implement swaps-over-nostr for qml
This commit is contained in:
committed by
ThomasV
parent
22995b4a34
commit
993a575b7f
@@ -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()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user