1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-16 03:18:09 +00:00

In unlock() show 'Processing' instead of 'Verifying PIN' if the PIN is empty.

This commit is contained in:
Andrew Kozlik 2019-02-22 19:04:14 +01:00
parent cf9e276c6e
commit 0e897f673a

View File

@ -780,9 +780,11 @@ secbool storage_unlock(uint32_t pin)
return secfalse; return secfalse;
} }
const char* message = (pin == PIN_EMPTY) ? PROCESSING_MSG : VERIFYING_PIN_MSG;
uint32_t wait = (1 << ctr) - 1; uint32_t wait = (1 << ctr) - 1;
if (ui_callback) { if (ui_callback) {
if (sectrue == ui_callback(wait, 0, VERIFYING_PIN_MSG)) { if (sectrue == ui_callback(wait, 0, message)) {
return secfalse; return secfalse;
} }
} }
@ -796,7 +798,7 @@ secbool storage_unlock(uint32_t pin)
} else { } else {
progress = ((wait - rem) * 10 + i) * 80 / wait; progress = ((wait - rem) * 10 + i) * 80 / wait;
} }
if (sectrue == ui_callback(rem, progress, VERIFYING_PIN_MSG)) { if (sectrue == ui_callback(rem, progress, message)) {
return secfalse; return secfalse;
} }
} }
@ -804,7 +806,7 @@ secbool storage_unlock(uint32_t pin)
} }
} }
if (ui_callback) { if (ui_callback) {
if (sectrue == ui_callback(0, 800, VERIFYING_PIN_MSG)) { if (sectrue == ui_callback(0, 800, message)) {
return secfalse; return secfalse;
} }
} }