From 412528d52250cd1ec67f0826daf50634034fb919 Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Fri, 28 Mar 2014 16:26:48 +0100 Subject: [PATCH] fix PinMatrixRequest type enum --- trezorlib/client.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/trezorlib/client.py b/trezorlib/client.py index e05e5b339..8dccbb325 100644 --- a/trezorlib/client.py +++ b/trezorlib/client.py @@ -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):