1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-14 11:39:03 +00:00

fix PinMatrixRequest type enum

This commit is contained in:
Pavol Rusnak 2014-03-28 16:26:48 +01:00
parent dc0d7fd1d6
commit 412528d522

View File

@ -139,7 +139,15 @@ class TextUIMixin(object):
return proto.ButtonAck()
def callback_PinMatrixRequest(self, msg):
pin = raw_input("PIN required: %s " % msg.message)
if msg.type == 1:
desc = 'old PIN'
elif msg.type == 2:
desc = 'new PIN'
elif msg.type == 3:
desc = 'new PIN again'
else:
desc = 'PIN'
pin = raw_input("Please enter %s: " % desc)
return proto.PinMatrixAck(pin=pin)
def callback_PassphraseRequest(self, msg):