Example #1
0
 def password_dialog(self, msg=None):
     if not msg:
         msg = _("Do not enter your device PIN here !\r\n\r\n" \
                 "Your BTChip wants to talk to you and tell you a unique second factor code.\r\n" \
                 "For this to work, please open a text editor (on a different computer / device if you believe this computer is compromised) and put your cursor into it, unplug your BTChip and plug it back in.\r\n" \
                 "It should show itself to your computer as a keyboard and output the second factor along with a summary of the transaction it is signing into the text-editor.\r\n\r\n" \
                 "Check that summary and then enter the second factor code here.\r\n" \
                 "Before clicking OK, re-plug the device once more (unplug it and plug it again if you read the second factor code on the same computer)")
     d = QDialog()
     d.setModal(1)
     d.setLayout( make_password_dialog(d, None, msg, False) )
     return run_password_dialog(d, None, None)
Example #2
0
 def password_dialog(self, msg=None):
     if not msg:
         msg = _("Do not enter your device PIN here !\r\n\r\n" \
                 "Your BTChip wants to talk to you and tell you a unique second factor code.\r\n" \
                 "For this to work, please open a text editor (on a different computer / device if you believe this computer is compromised) and put your cursor into it, unplug your BTChip and plug it back in.\r\n" \
                 "It should show itself to your computer as a keyboard and output the second factor along with a summary of the transaction it is signing into the text-editor.\r\n\r\n" \
                 "Check that summary and then enter the second factor code here.\r\n" \
                 "Before clicking OK, re-plug the device once more (unplug it and plug it again if you read the second factor code on the same computer)")
     d = QDialog()
     d.setModal(1)
     d.setLayout(make_password_dialog(d, None, msg, False))
     return run_password_dialog(d, None, None)
Example #3
0
 def passphrase_dialog(self):
     from electrum_doged_gui.qt.password_dialog import make_password_dialog, run_password_dialog
     d = QDialog()
     d.setModal(1)
     d.setLayout(make_password_dialog(d, None, self.message, False))
     confirmed, p, passphrase = run_password_dialog(d, None, None)
     if not confirmed:
         QMessageBox.critical(None, _('Error'), _("Password request canceled"), _('OK'))
         self.passphrase = None
     else:
         if passphrase is None:
             passphrase = '' # Even blank string is valid Trezor passphrase
         self.passphrase = unicodedata.normalize('NFKD', unicode(passphrase))
     self.done.set()
Example #4
0
 def passphrase_dialog(self):
     from electrum_doged_gui.qt.password_dialog import make_password_dialog, run_password_dialog
     d = QDialog()
     d.setModal(1)
     d.setLayout(make_password_dialog(d, None, self.message, False))
     confirmed, p, passphrase = run_password_dialog(d, None, None)
     if not confirmed:
         QMessageBox.critical(None, _('Error'),
                              _("Password request canceled"), _('OK'))
         self.passphrase = None
     else:
         if passphrase is None:
             passphrase = ''  # Even blank string is valid Trezor passphrase
         self.passphrase = unicodedata.normalize('NFKD',
                                                 unicode(passphrase))
     self.done.set()