|
|
|
@ -212,16 +212,19 @@ ElDialog { |
|
|
|
ChannelOpener { |
|
|
|
ChannelOpener { |
|
|
|
id: channelopener |
|
|
|
id: channelopener |
|
|
|
wallet: Daemon.currentWallet |
|
|
|
wallet: Daemon.currentWallet |
|
|
|
onAuthRequired: { |
|
|
|
onAuthRequired: (method, authMessage) => { |
|
|
|
app.handleAuthRequired(channelopener, method, authMessage) |
|
|
|
app.handleAuthRequired(channelopener, method, authMessage) |
|
|
|
} |
|
|
|
} |
|
|
|
onValidationError: { |
|
|
|
onValidationError: (code, message) => { |
|
|
|
if (code == 'invalid_nodeid') { |
|
|
|
if (code == 'invalid_nodeid') { |
|
|
|
var dialog = app.messageDialog.createObject(app, { title: qsTr('Error'), 'text': message }) |
|
|
|
var dialog = app.messageDialog.createObject(app, { |
|
|
|
|
|
|
|
title: qsTr('Error'), |
|
|
|
|
|
|
|
text: message |
|
|
|
|
|
|
|
}) |
|
|
|
dialog.open() |
|
|
|
dialog.open() |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
onConflictingBackup: { |
|
|
|
onConflictingBackup: (message) => { |
|
|
|
var dialog = app.messageDialog.createObject(app, { 'text': message, 'yesno': true }) |
|
|
|
var dialog = app.messageDialog.createObject(app, { 'text': message, 'yesno': true }) |
|
|
|
dialog.open() |
|
|
|
dialog.open() |
|
|
|
dialog.accepted.connect(function() { |
|
|
|
dialog.accepted.connect(function() { |
|
|
|
@ -237,17 +240,17 @@ ElDialog { |
|
|
|
}) |
|
|
|
}) |
|
|
|
dialog.open() |
|
|
|
dialog.open() |
|
|
|
} |
|
|
|
} |
|
|
|
onChannelOpening: { |
|
|
|
onChannelOpening: (peer) => { |
|
|
|
console.log('Channel is opening') |
|
|
|
console.log('Channel is opening') |
|
|
|
app.channelOpenProgressDialog.reset() |
|
|
|
app.channelOpenProgressDialog.reset() |
|
|
|
app.channelOpenProgressDialog.peer = peer |
|
|
|
app.channelOpenProgressDialog.peer = peer |
|
|
|
app.channelOpenProgressDialog.open() |
|
|
|
app.channelOpenProgressDialog.open() |
|
|
|
} |
|
|
|
} |
|
|
|
onChannelOpenError: { |
|
|
|
onChannelOpenError: (message) => { |
|
|
|
app.channelOpenProgressDialog.state = 'failed' |
|
|
|
app.channelOpenProgressDialog.state = 'failed' |
|
|
|
app.channelOpenProgressDialog.error = message |
|
|
|
app.channelOpenProgressDialog.error = message |
|
|
|
} |
|
|
|
} |
|
|
|
onChannelOpenSuccess: { |
|
|
|
onChannelOpenSuccess: (cid, has_onchain_backup, min_depth, tx_complete) => { |
|
|
|
var message = qsTr('Channel established.') + ' ' |
|
|
|
var message = qsTr('Channel established.') + ' ' |
|
|
|
+ qsTr('This channel will be usable after %1 confirmations').arg(min_depth) |
|
|
|
+ qsTr('This channel will be usable after %1 confirmations').arg(min_depth) |
|
|
|
if (!tx_complete) { |
|
|
|
if (!tx_complete) { |
|
|
|
|