forked from Public/monero-gui
Merge pull request #2772
48aab5c WalletManager: wallet recovery - seed offset passphrase support (xiphon)
This commit is contained in:
@@ -59,6 +59,7 @@ Rectangle {
|
||||
wizardController.walletOptionsLocation = '';
|
||||
wizardController.walletOptionsPassword = '';
|
||||
wizardController.walletOptionsSeed = '';
|
||||
wizardController.walletOptionsSeedOffset = '';
|
||||
wizardController.walletOptionsRecoverAddress = ''
|
||||
wizardController.walletOptionsRecoverViewkey = ''
|
||||
wizardController.walletOptionsRecoverSpendkey = ''
|
||||
@@ -92,6 +93,7 @@ Rectangle {
|
||||
property string walletOptionsLocation: ''
|
||||
property string walletOptionsPassword: ''
|
||||
property string walletOptionsSeed: ''
|
||||
property string walletOptionsSeedOffset: ''
|
||||
property string walletOptionsRecoverAddress: ''
|
||||
property string walletOptionsRecoverViewkey: ''
|
||||
property string walletOptionsRecoverSpendkey: ''
|
||||
@@ -394,7 +396,7 @@ Rectangle {
|
||||
var wallet = ''
|
||||
// From seed or keys
|
||||
if(wizardController.walletRestoreMode === 'seed')
|
||||
wallet = walletManager.recoveryWallet(tmp_wallet_filename, wizardController.walletOptionsSeed, nettype, restoreHeight, kdfRounds)
|
||||
wallet = walletManager.recoveryWallet(tmp_wallet_filename, wizardController.walletOptionsSeed, wizardController.walletOptionsSeedOffset, nettype, restoreHeight, kdfRounds);
|
||||
else
|
||||
wallet = walletManager.createWalletFromKeys(tmp_wallet_filename, wizardController.language_wallet, nettype,
|
||||
wizardController.walletOptionsRecoverAddress, wizardController.walletOptionsRecoverViewkey,
|
||||
|
||||
@@ -164,8 +164,8 @@ Rectangle {
|
||||
ColumnLayout {
|
||||
// seed textarea
|
||||
visible: wizardController.walletRestoreMode === 'seed'
|
||||
Layout.preferredHeight: 100
|
||||
Layout.fillWidth: true
|
||||
spacing: 10
|
||||
|
||||
Rectangle {
|
||||
color: "transparent"
|
||||
@@ -217,6 +217,20 @@ Rectangle {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MoneroComponents.CheckBox2 {
|
||||
id: seedOffsetCheckbox
|
||||
text: qsTr("Seed offset passphrase (optional)") + translationManager.emptyString
|
||||
}
|
||||
|
||||
MoneroComponents.LineEdit {
|
||||
id: seedOffset
|
||||
echoMode: TextInput.Password
|
||||
Layout.fillWidth: true
|
||||
placeholderFontSize: 16
|
||||
placeholderText: qsTr("Passphrase") + translationManager.emptyString
|
||||
visible: seedOffsetCheckbox.checked
|
||||
}
|
||||
}
|
||||
|
||||
MoneroComponents.LineEdit {
|
||||
@@ -294,6 +308,7 @@ Rectangle {
|
||||
switch (wizardController.walletRestoreMode) {
|
||||
case 'seed':
|
||||
wizardController.walletOptionsSeed = seedInput.text;
|
||||
wizardController.walletOptionsSeedOffset = seedOffsetCheckbox.checked ? seedOffset.text : "";
|
||||
break;
|
||||
default: // walletRestoreMode = keys or qr
|
||||
wizardController.walletOptionsRecoverAddress = addressLine.text;
|
||||
@@ -325,6 +340,8 @@ Rectangle {
|
||||
// cleanup
|
||||
wizardWalletInput.reset();
|
||||
seedInput.text = "";
|
||||
seedOffsetCheckbox.checked = false;
|
||||
seedOffset.text = "";
|
||||
addressLine.text = "";
|
||||
spendKeyLine.text = "";
|
||||
viewKeyLine.text = "";
|
||||
|
||||
Reference in New Issue
Block a user