1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-13 19:18:56 +00:00

legacy: replace load_device mnemonic to mnemonics

This commit is contained in:
Tomas Susanka 2019-07-24 13:51:49 +02:00
parent 2b6a14cb5f
commit accc33c8e6
3 changed files with 5 additions and 5 deletions

View File

@ -503,9 +503,9 @@ void config_loadDevice(const LoadDevice *msg) {
if (msg->has_node) {
storage_delete(KEY_MNEMONIC);
config_setNode(&(msg->node));
} else if (msg->has_mnemonic) {
} else if (msg->mnemonics_count) {
storage_delete(KEY_NODE);
config_setMnemonic(msg->mnemonic);
config_setMnemonic(msg->mnemonics[0]);
}
if (msg->has_language) {

View File

@ -213,8 +213,8 @@ void fsm_msgLoadDevice(const LoadDevice *msg) {
return;
}
if (msg->has_mnemonic && !(msg->has_skip_checksum && msg->skip_checksum)) {
if (!mnemonic_check(msg->mnemonic)) {
if (msg->mnemonics_count && !(msg->has_skip_checksum && msg->skip_checksum)) {
if (!mnemonic_check(msg->mnemonics[0])) {
fsm_sendFailure(FailureType_Failure_DataError,
_("Mnemonic with wrong checksum provided"));
layoutHome();

View File

@ -16,7 +16,7 @@ ApplySettings.homescreen max_size:1024
Ping.message max_size:256
LoadDevice.mnemonic max_size:241
LoadDevice.mnemonics max_count:16 max_size:241
LoadDevice.pin max_size:10
LoadDevice.language max_size:17
LoadDevice.label max_size:33