1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-17 21:22:10 +00:00

reset: add Features.needs_backup

This commit is contained in:
Pavol Rusnak 2017-06-26 19:51:43 +02:00
parent 97fa33de46
commit b65068c159
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D
2 changed files with 2 additions and 1 deletions

View File

@ -234,6 +234,7 @@ void fsm_msgGetFeatures(GetFeatures *msg)
resp->has_imported = true; resp->imported = storage.has_imported && storage.imported; resp->has_imported = true; resp->imported = storage.has_imported && storage.imported;
resp->has_pin_cached = true; resp->pin_cached = session_isPinCached(); resp->has_pin_cached = true; resp->pin_cached = session_isPinCached();
resp->has_passphrase_cached = true; resp->passphrase_cached = session_isPassphraseCached(); resp->has_passphrase_cached = true; resp->passphrase_cached = session_isPassphraseCached();
resp->has_needs_backup = true; resp->needs_backup = storage_needsBackup();
msg_write(MessageType_MessageType_Features, resp); msg_write(MessageType_MessageType_Features, resp);
} }

View File

@ -114,7 +114,7 @@ void reset_backup(void)
fsm_sendFailure(FailureType_Failure_UnexpectedMessage, _("Seed already backed up")); fsm_sendFailure(FailureType_Failure_UnexpectedMessage, _("Seed already backed up"));
return; return;
} else { } else {
storage.has_needs_backup = false; storage.has_needs_backup = true;
storage.needs_backup = false; storage.needs_backup = false;
storage_commit(); storage_commit();
} }