From 145e7e3440c5afdc0cb1e5c0f2b35b7e7ab1f06f Mon Sep 17 00:00:00 2001 From: Sander van Grieken Date: Tue, 8 Mar 2022 12:04:56 +0100 Subject: [PATCH] add seed warning texts --- .../gui/qml/components/WizardComponents.qml | 39 ++++++++++++++++++- 1 file changed, 37 insertions(+), 2 deletions(-) diff --git a/electrum/gui/qml/components/WizardComponents.qml b/electrum/gui/qml/components/WizardComponents.qml index dcd5b4afe..e367dcc50 100644 --- a/electrum/gui/qml/components/WizardComponents.qml +++ b/electrum/gui/qml/components/WizardComponents.qml @@ -116,6 +116,7 @@ Item { onAccept: { wizard_data['seed'] = seedtext.text + wizard_data['seed_type'] = 'segwit' wizard_data['seed_extend'] = extendcb.checked wizard_data['seed_extra_words'] = extendcb.checked ? customwordstext.text : '' } @@ -124,7 +125,15 @@ Item { width: parent.width columns: 1 - Label { text: qsTr('Generated Seed') } + TextArea { + id: warningtext + readOnly: true + Layout.fillWidth: true + wrapMode: TextInput.WordWrap + textFormat: TextEdit.RichText + background: Rectangle { color: "transparent" } + } + Label { text: qsTr('Your wallet generation seed is:') } TextArea { id: seedtext readOnly: true @@ -155,7 +164,23 @@ Item { Bitcoin { id: bitcoin - onGeneratedSeedChanged: seedtext.text = generated_seed + onGeneratedSeedChanged: { + seedtext.text = generated_seed + + var t = [ + "

", + qsTr("Please save these %1 words on paper (order is important). ").arg(generated_seed.split(" ").length), + qsTr("This seed will allow you to recover your wallet in case of computer failure."), + "

", + "" + qsTr("WARNING") + ":", + "" + ] + warningtext.text = t.join("") + } } } } @@ -167,6 +192,7 @@ Item { onAccept: { wizard_data['seed'] = seedtext.text wizard_data['seed_extend'] = extendcb.checked + wizard_data['seed_extra_words'] = extendcb.checked ? customwordstext.text : '' wizard_data['seed_bip39'] = bip39cb.checked } @@ -225,6 +251,15 @@ Item { width: parent.width columns: 1 + TextArea { + readOnly: true + Layout.fillWidth: true + wrapMode: TextInput.WordWrap + text: qsTr('Your seed is important!') + ' ' + + qsTr('If you lose your seed, your money will be permanently lost.') + ' ' + + qsTr('To make sure that you have properly saved your seed, please retype it here.') + background: Rectangle { color: "transparent" } + } Label { text: qsTr('Confirm your seed (re-enter)') } TextArea { id: confirm