Browse Source

display segwit warning in privkey window

master
ThomasV 8 years ago
parent
commit
52a482a9b5
  1. 6
      gui/qt/main_window.py

6
gui/qt/main_window.py

@ -1914,10 +1914,12 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
traceback.print_exc(file=sys.stdout) traceback.print_exc(file=sys.stdout)
self.show_message(str(e)) self.show_message(str(e))
return return
xtype = bitcoin.deserialize_privkey(pk)[0]
d = WindowModalDialog(self, _("Private key")) d = WindowModalDialog(self, _("Private key"))
d.setMinimumSize(600, 200) d.setMinimumSize(600, 150)
vbox = QVBoxLayout() vbox = QVBoxLayout()
vbox.addWidget(QLabel(_("Address") + ': ' + address)) vbox.addWidget(QLabel(_("Address") + ': ' + address))
vbox.addWidget(QLabel(_("Script type") + ': ' + xtype))
vbox.addWidget(QLabel(_("Private key") + ':')) vbox.addWidget(QLabel(_("Private key") + ':'))
keys_e = ShowQRTextEdit(text=pk) keys_e = ShowQRTextEdit(text=pk)
keys_e.addCopyButton(self.app) keys_e.addCopyButton(self.app)
@ -1927,6 +1929,8 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
rds_e = ShowQRTextEdit(text=redeem_script) rds_e = ShowQRTextEdit(text=redeem_script)
rds_e.addCopyButton(self.app) rds_e.addCopyButton(self.app)
vbox.addWidget(rds_e) 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))) vbox.addLayout(Buttons(CloseButton(d)))
d.setLayout(vbox) d.setLayout(vbox)
d.exec_() d.exec_()

Loading…
Cancel
Save