SomberNight 7 years ago
parent
commit
ffbd0ccecd
  1. 8
      plugins/keepkey/clientbase.py
  2. 8
      plugins/trezor/clientbase.py

8
plugins/keepkey/clientbase.py

@ -69,7 +69,13 @@ class GuiMixin(object):
if passphrase is None:
return self.proto.Cancel()
passphrase = bip39_normalize_passphrase(passphrase)
return self.proto.PassphraseAck(passphrase=passphrase)
ack = self.proto.PassphraseAck(passphrase=passphrase)
length = len(ack.passphrase)
if length > 50:
self.handler.show_error(_("Too long passphrase ({} > 50 chars).").format(length))
return self.proto.Cancel()
return ack
def callback_WordRequest(self, msg):
self.step += 1

8
plugins/trezor/clientbase.py

@ -72,7 +72,13 @@ class GuiMixin(object):
if passphrase is None:
return self.proto.Cancel()
passphrase = bip39_normalize_passphrase(passphrase)
return self.proto.PassphraseAck(passphrase=passphrase)
ack = self.proto.PassphraseAck(passphrase=passphrase)
length = len(ack.passphrase)
if length > 50:
self.handler.show_error(_("Too long passphrase ({} > 50 chars).").format(length))
return self.proto.Cancel()
return ack
def callback_PassphraseStateRequest(self, msg):
return self.proto.PassphraseStateAck()

Loading…
Cancel
Save