wizard: add a warning to multisig wallet creation to backup xpubs
This commit is contained in:
@@ -149,6 +149,18 @@ Builder.load_string('''
|
|||||||
range: 1, n.value
|
range: 1, n.value
|
||||||
step: 1
|
step: 1
|
||||||
value: 2
|
value: 2
|
||||||
|
Widget
|
||||||
|
size_hint: 1, 1
|
||||||
|
Label:
|
||||||
|
id: backup_warning_label
|
||||||
|
color: root.text_color
|
||||||
|
size_hint: 1, None
|
||||||
|
text_size: self.width, None
|
||||||
|
height: self.texture_size[1]
|
||||||
|
opacity: int(m.value != n.value)
|
||||||
|
text: _("Warning: to be able to restore a multisig wallet, " \
|
||||||
|
"you should include the master public key for each cosigner " \
|
||||||
|
"in all of your backups.")
|
||||||
|
|
||||||
|
|
||||||
<WizardChoiceDialog>
|
<WizardChoiceDialog>
|
||||||
|
|||||||
@@ -664,18 +664,25 @@ class InstallWizard(QDialog, MessageBoxMixin, BaseWizard):
|
|||||||
def on_m(m):
|
def on_m(m):
|
||||||
m_label.setText(_('Require {0} signatures').format(m))
|
m_label.setText(_('Require {0} signatures').format(m))
|
||||||
cw.set_m(m)
|
cw.set_m(m)
|
||||||
|
backup_warning_label.setVisible(cw.m != cw.n)
|
||||||
def on_n(n):
|
def on_n(n):
|
||||||
n_label.setText(_('From {0} cosigners').format(n))
|
n_label.setText(_('From {0} cosigners').format(n))
|
||||||
cw.set_n(n)
|
cw.set_n(n)
|
||||||
m_edit.setMaximum(n)
|
m_edit.setMaximum(n)
|
||||||
|
backup_warning_label.setVisible(cw.m != cw.n)
|
||||||
n_edit.valueChanged.connect(on_n)
|
n_edit.valueChanged.connect(on_n)
|
||||||
m_edit.valueChanged.connect(on_m)
|
m_edit.valueChanged.connect(on_m)
|
||||||
on_n(2)
|
|
||||||
on_m(2)
|
|
||||||
vbox = QVBoxLayout()
|
vbox = QVBoxLayout()
|
||||||
vbox.addWidget(cw)
|
vbox.addWidget(cw)
|
||||||
vbox.addWidget(WWLabel(_("Choose the number of signatures needed to unlock funds in your wallet:")))
|
vbox.addWidget(WWLabel(_("Choose the number of signatures needed to unlock funds in your wallet:")))
|
||||||
vbox.addLayout(grid)
|
vbox.addLayout(grid)
|
||||||
|
vbox.addSpacing(2 * char_width_in_lineedit())
|
||||||
|
backup_warning_label = WWLabel(_("Warning: to be able to restore a multisig wallet, "
|
||||||
|
"you should include the master public key for each cosigner "
|
||||||
|
"in all of your backups."))
|
||||||
|
vbox.addWidget(backup_warning_label)
|
||||||
|
on_n(2)
|
||||||
|
on_m(2)
|
||||||
self.exec_layout(vbox, _("Multi-Signature Wallet"))
|
self.exec_layout(vbox, _("Multi-Signature Wallet"))
|
||||||
m = int(m_edit.value())
|
m = int(m_edit.value())
|
||||||
n = int(n_edit.value())
|
n = int(n_edit.value())
|
||||||
|
|||||||
Reference in New Issue
Block a user