diff --git a/core/src/apps/common/storage/__init__.py b/core/src/apps/common/storage/__init__.py index 50b0bc620..d00dab70b 100644 --- a/core/src/apps/common/storage/__init__.py +++ b/core/src/apps/common/storage/__init__.py @@ -27,9 +27,9 @@ def init_unlocked() -> None: def _migrate_from_version_01() -> None: # Make the U2F counter public and writable even when storage is locked. # U2F counter wasn't public, so we are intentionally not using storage.device module. - counter = common._get(common._APP_DEVICE, device._U2F_COUNTER) + counter = common._get(common._APP_DEVICE, device.U2F_COUNTER) if counter is not None: device.set_u2f_counter(int.from_bytes(counter, "big")) # Delete the old, non-public U2F_COUNTER. - common._delete(common._APP_DEVICE, device._U2F_COUNTER) + common._delete(common._APP_DEVICE, device.U2F_COUNTER) set_current_version() diff --git a/core/src/apps/common/storage/device.py b/core/src/apps/common/storage/device.py index 7b0b509c9..eb1d6a5b4 100644 --- a/core/src/apps/common/storage/device.py +++ b/core/src/apps/common/storage/device.py @@ -22,7 +22,7 @@ _USE_PASSPHRASE = const(0x05) # bool (0x01 or empty) _HOMESCREEN = const(0x06) # bytes _NEEDS_BACKUP = const(0x07) # bool (0x01 or empty) _FLAGS = const(0x08) # int -_U2F_COUNTER = const(0x09) # int +U2F_COUNTER = const(0x09) # int _PASSPHRASE_SOURCE = const(0x0A) # int _UNFINISHED_BACKUP = const(0x0B) # bool (0x01 or empty) _AUTOLOCK_DELAY_MS = const(0x0C) # int @@ -199,11 +199,11 @@ def set_autolock_delay_ms(delay_ms: int) -> None: def next_u2f_counter() -> Optional[int]: - return common._next_counter(_NAMESPACE, _U2F_COUNTER, True) # writable when locked + return common._next_counter(_NAMESPACE, U2F_COUNTER, True) # writable when locked def set_u2f_counter(count: int) -> None: - common._set_counter(_NAMESPACE, _U2F_COUNTER, count, True) # writable when locked + common._set_counter(_NAMESPACE, U2F_COUNTER, count, True) # writable when locked def set_slip39_identifier(identifier: int) -> None: