From b7444ac13e51d02cf9818870879e2549c2f2216c Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Thu, 14 Dec 2017 16:27:18 +0100 Subject: [PATCH] modtrezorconfig: fix wipe error --- embed/extmod/modtrezorconfig/modtrezorconfig.c | 4 +--- embed/extmod/modtrezorconfig/storage.h | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/embed/extmod/modtrezorconfig/modtrezorconfig.c b/embed/extmod/modtrezorconfig/modtrezorconfig.c index 72e6fadff..5fb0c03ca 100644 --- a/embed/extmod/modtrezorconfig/modtrezorconfig.c +++ b/embed/extmod/modtrezorconfig/modtrezorconfig.c @@ -107,9 +107,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_3(mod_trezorconfig_set_obj, mod_trezorconfig_set) /// Erases the whole config. Use with caution! /// ''' STATIC mp_obj_t mod_trezorconfig_wipe(void) { - if (sectrue != storage_wipe()) { - mp_raise_msg(&mp_type_RuntimeError, "Could not wipe storage"); - } + storage_wipe(); return mp_const_none; } STATIC MP_DEFINE_CONST_FUN_OBJ_0(mod_trezorconfig_wipe_obj, mod_trezorconfig_wipe); diff --git a/embed/extmod/modtrezorconfig/storage.h b/embed/extmod/modtrezorconfig/storage.h index 579936eed..7fc9eef4c 100644 --- a/embed/extmod/modtrezorconfig/storage.h +++ b/embed/extmod/modtrezorconfig/storage.h @@ -10,7 +10,7 @@ #include "../../trezorhal/secbool.h" void storage_init(void); -secbool storage_wipe(void); +void storage_wipe(void); secbool storage_unlock(const uint8_t *pin, size_t len); secbool storage_has_pin(void); secbool storage_change_pin(const uint8_t *pin, size_t len, const uint8_t *newpin, size_t newlen);