modtrezorconfig: fix wipe error

pull/25/head
Pavol Rusnak 7 years ago
parent 44196be481
commit b7444ac13e
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D

@ -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);

@ -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);

Loading…
Cancel
Save