display segwit warning in privkey window
This commit is contained in:
parent
337675d134
commit
52a482a9b5
|
@ -1914,10 +1914,12 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
|
|||
traceback.print_exc(file=sys.stdout)
|
||||
self.show_message(str(e))
|
||||
return
|
||||
xtype = bitcoin.deserialize_privkey(pk)[0]
|
||||
d = WindowModalDialog(self, _("Private key"))
|
||||
d.setMinimumSize(600, 200)
|
||||
d.setMinimumSize(600, 150)
|
||||
vbox = QVBoxLayout()
|
||||
vbox.addWidget(QLabel(_("Address") + ': ' + address))
|
||||
vbox.addWidget(QLabel(_("Script type") + ': ' + xtype))
|
||||
vbox.addWidget(QLabel(_("Private key") + ':'))
|
||||
keys_e = ShowQRTextEdit(text=pk)
|
||||
keys_e.addCopyButton(self.app)
|
||||
|
@ -1927,6 +1929,8 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
|
|||
rds_e = ShowQRTextEdit(text=redeem_script)
|
||||
rds_e.addCopyButton(self.app)
|
||||
vbox.addWidget(rds_e)
|
||||
if xtype in ['p2wpkh', 'p2wsh', 'p2wphk-p2sh', 'p2wsh-p2sh']:
|
||||
vbox.addWidget(WWLabel(_("Warning: the format of segwit private keys may not be compatible with other wallets")))
|
||||
vbox.addLayout(Buttons(CloseButton(d)))
|
||||
d.setLayout(vbox)
|
||||
d.exec_()
|
||||
|
|
Loading…
Reference in New Issue