mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-10 15:30:55 +00:00
reset: show needs backup signed when storage is not backed up
This commit is contained in:
parent
9298e4d9e3
commit
97fa33de46
@ -83,6 +83,10 @@ void layoutHome(void)
|
|||||||
oledDrawBitmap(40, 0, &bmp_logo64);
|
oledDrawBitmap(40, 0, &bmp_logo64);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (storage_needsBackup()) {
|
||||||
|
oledBox(0, 0, 127, 8, false);
|
||||||
|
oledDrawStringCenter(0, "NEEDS BACKUP!");
|
||||||
|
}
|
||||||
oledRefresh();
|
oledRefresh();
|
||||||
|
|
||||||
// Reset lock screen timeout
|
// Reset lock screen timeout
|
||||||
|
@ -110,7 +110,7 @@ static char current_word[10], current_word_display[11];
|
|||||||
|
|
||||||
void reset_backup(void)
|
void reset_backup(void)
|
||||||
{
|
{
|
||||||
if (!storage.has_needs_backup || !storage.needs_backup) {
|
if (!storage_needsBackup()) {
|
||||||
fsm_sendFailure(FailureType_Failure_UnexpectedMessage, _("Seed already backed up"));
|
fsm_sendFailure(FailureType_Failure_UnexpectedMessage, _("Seed already backed up"));
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
|
@ -580,6 +580,12 @@ bool storage_isInitialized(void)
|
|||||||
return storage.has_node || storage.has_mnemonic;
|
return storage.has_node || storage.has_mnemonic;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool storage_needsBackup(void)
|
||||||
|
{
|
||||||
|
return storage.has_needs_backup && storage.needs_backup;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
uint32_t storage_nextU2FCounter(void)
|
uint32_t storage_nextU2FCounter(void)
|
||||||
{
|
{
|
||||||
uint32_t *ptr = ((uint32_t *) FLASH_STORAGE_U2FAREA) + (storage_u2f_offset / 32);
|
uint32_t *ptr = ((uint32_t *) FLASH_STORAGE_U2FAREA) + (storage_u2f_offset / 32);
|
||||||
|
@ -68,6 +68,8 @@ void storage_setU2FCounter(uint32_t u2fcounter);
|
|||||||
|
|
||||||
bool storage_isInitialized(void);
|
bool storage_isInitialized(void);
|
||||||
|
|
||||||
|
bool storage_needsBackup(void);
|
||||||
|
|
||||||
extern Storage storage;
|
extern Storage storage;
|
||||||
|
|
||||||
extern char storage_uuid_str[25];
|
extern char storage_uuid_str[25];
|
||||||
|
Loading…
Reference in New Issue
Block a user