From 18ab357e2ed634782314a0d0b068e9334df15123 Mon Sep 17 00:00:00 2001 From: Tomas Susanka Date: Thu, 7 Mar 2019 16:28:24 +0100 Subject: [PATCH] debug: accept bytes in mnemonic field --- trezorlib/debuglink.py | 4 ++-- trezorlib/tests/device_tests/test_msg_recoverydevice_t2.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/trezorlib/debuglink.py b/trezorlib/debuglink.py index 9a94bfbb14..ae877bb268 100644 --- a/trezorlib/debuglink.py +++ b/trezorlib/debuglink.py @@ -63,9 +63,9 @@ class DebugLink: obj = self._call(proto.DebugLinkGetState()) return obj.layout - def read_mnemonic(self): + def read_mnemonic_secret(self): obj = self._call(proto.DebugLinkGetState()) - return obj.mnemonic + return obj.mnemonic_secret def read_recovery_word(self): obj = self._call(proto.DebugLinkGetState()) diff --git a/trezorlib/tests/device_tests/test_msg_recoverydevice_t2.py b/trezorlib/tests/device_tests/test_msg_recoverydevice_t2.py index 3dba9a3db6..8748e6a006 100644 --- a/trezorlib/tests/device_tests/test_msg_recoverydevice_t2.py +++ b/trezorlib/tests/device_tests/test_msg_recoverydevice_t2.py @@ -71,7 +71,7 @@ class TestMsgRecoverydeviceT2(TrezorTest): # Mnemonic is the same self.client.init_device() - assert self.client.debug.read_mnemonic() == self.mnemonic12 + assert self.client.debug.read_mnemonic_secret() == self.mnemonic12.encode() assert self.client.features.pin_protection is True assert self.client.features.passphrase_protection is True @@ -112,7 +112,7 @@ class TestMsgRecoverydeviceT2(TrezorTest): # Mnemonic is the same self.client.init_device() - assert self.client.debug.read_mnemonic() == self.mnemonic12 + assert self.client.debug.read_mnemonic_secret() == self.mnemonic12.encode() assert self.client.features.pin_protection is False assert self.client.features.passphrase_protection is False