qml: implement bip39 account detection
This commit is contained in:
committed by
accumulator
parent
b40a608b74
commit
0e0c7980dd
@@ -1,9 +1,11 @@
|
||||
import QtQuick 2.6
|
||||
import QtQuick.Layouts 1.0
|
||||
import QtQuick.Controls 2.1
|
||||
import QtQuick.Controls.Material 2.0
|
||||
|
||||
import org.electrum 1.0
|
||||
|
||||
import ".."
|
||||
import "../controls"
|
||||
|
||||
WizardComponent {
|
||||
@@ -86,10 +88,33 @@ WizardComponent {
|
||||
Label {
|
||||
text: qsTr('Script type and Derivation path')
|
||||
}
|
||||
Button {
|
||||
text: qsTr('Detect Existing Accounts')
|
||||
enabled: false
|
||||
Pane {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
padding: 0
|
||||
visible: !isMultisig
|
||||
|
||||
FlatButton {
|
||||
text: qsTr('Detect Existing Accounts')
|
||||
onClicked: {
|
||||
var dialog = bip39recoveryDialog.createObject(mainLayout, {
|
||||
walletType: wizard_data['wallet_type'],
|
||||
seed: wizard_data['seed'],
|
||||
seedExtraWords: wizard_data['seed_extra_words']
|
||||
})
|
||||
dialog.accepted.connect(function () {
|
||||
// select matching script type button and set derivation path
|
||||
for (var i = 0; i < scripttypegroup.buttons.length; i++) {
|
||||
var btn = scripttypegroup.buttons[i]
|
||||
if (btn.visible && btn.scripttype == dialog.scriptType) {
|
||||
btn.checked = true
|
||||
derivationpathtext.text = dialog.derivationPath
|
||||
return
|
||||
}
|
||||
}
|
||||
})
|
||||
dialog.open()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Label {
|
||||
@@ -157,6 +182,11 @@ WizardComponent {
|
||||
id: bitcoin
|
||||
}
|
||||
|
||||
Component {
|
||||
id: bip39recoveryDialog
|
||||
BIP39RecoveryDialog { }
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
isMultisig = wizard_data['wallet_type'] == 'multisig'
|
||||
if (isMultisig) {
|
||||
|
||||
Reference in New Issue
Block a user