Files
pay/desktop/NewAccountCreateHDAccount.qml
T

72 lines
2.0 KiB
QML
Raw Permalink Normal View History

2021-10-25 19:42:13 +02:00
import QtQuick 2.11
import QtQuick.Controls 2.11
import QtQuick.Layouts 1.11
import "widgets" as Flowee
2021-10-25 19:42:13 +02:00
ColumnLayout {
id: newAccountCreateHDAccount
spacing: 10
Label {
id: title
2021-11-09 21:34:40 +01:00
text: qsTr("This creates a new empty wallet with smart creation of addresses from a single seed-phrase")
2021-10-25 19:42:13 +02:00
width: parent.width
}
RowLayout {
id: nameRow
Label {
2021-11-09 21:34:40 +01:00
text: qsTr("Name") + ":";
2021-10-25 19:42:13 +02:00
Layout.alignment: Qt.AlignBaseline
}
2021-11-02 19:38:36 +01:00
Flowee.TextField {
2021-10-25 19:42:13 +02:00
id: accountName
}
}
Item {
height: button.height
Layout.fillWidth: true
Flowee.Button {
2021-10-25 19:42:13 +02:00
id: button
text: qsTr("Go")
anchors.right: parent.right
onClicked: {
2021-11-02 19:29:14 +01:00
var options = Pay.createNewWallet(derivationPath.text, /* password */"", accountName.text);
2021-10-25 19:42:13 +02:00
var accounts = portfolio.accounts;
for (var i = 0; i < accounts.length; ++i) {
var a = accounts[i];
if (a.name === options.name) {
portfolio.current = a;
break;
}
}
root.visible = false;
}
}
}
2021-11-02 19:38:36 +01:00
Flowee.GroupBox {
2021-10-25 19:42:13 +02:00
title: qsTr("Advanced Options")
Layout.fillWidth: true
2021-10-30 15:23:43 +02:00
collapsed: true
2021-10-30 16:12:41 +02:00
columns: 3
2021-10-25 19:42:13 +02:00
/*
2021-11-02 19:35:38 +01:00
Flowee.CheckBox {
2021-10-25 19:42:13 +02:00
id: schnorr
text: qsTr("Default to signing using ECDSA");
tooltipText: qsTr("When enabled, newer style Schnorr signatures are not set as default for this wallet.")
Layout.columnSpan: 2
} */
Label {
2021-10-30 16:12:41 +02:00
text: qsTr("Derivation") + ":"
2021-10-29 18:20:42 +02:00
Layout.fillWidth: false
2021-10-25 19:42:13 +02:00
}
2021-11-02 19:38:36 +01:00
Flowee.TextField {
2021-10-25 19:42:13 +02:00
id: derivationPath
text: "m/44'/145'/0'" // default for BCH wallets
2021-11-02 19:29:14 +01:00
color: Pay.checkDerivation(text) ? palette.text : "red"
2021-10-25 19:42:13 +02:00
}
2021-10-30 16:12:41 +02:00
Item { width: 1; height: 1; Layout.fillWidth: true } // spacer
2021-10-25 19:42:13 +02:00
}
}