1
0

qewallet: minimally viable send_onchain()

This commit is contained in:
Sander van Grieken
2022-03-31 14:22:56 +02:00
parent 3a8e787b58
commit 3b66cf70ee
2 changed files with 49 additions and 10 deletions

View File

@@ -71,14 +71,13 @@ Pane {
Button {
text: qsTr('Pay')
enabled: false // TODO proper validation
enabled: amount.text != '' && address.text != ''// TODO proper validation
onClicked: {
var i_amount = parseInt(amount.text)
if (isNaN(i_amount))
var f_amount = parseFloat(amount.text)
if (isNaN(f_amount))
return
var result = Daemon.currentWallet.send_onchain(address.text, i_amount, undefined, false)
if (result)
app.stack.pop()
var sats = Config.unitsToSats(f_amount)
var result = Daemon.currentWallet.send_onchain(address.text, sats, undefined, false)
}
}