mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-18 04:18:10 +00:00
fix(legacy): convert storage ui enum to text
[no changelog]
This commit is contained in:
parent
ed89215a79
commit
0553a2d4b4
@ -150,7 +150,7 @@ const char *requestPin(PinMatrixRequestType type, const char *text) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
secbool protectPinUiCallback(uint32_t wait, uint32_t progress,
|
secbool protectPinUiCallback(uint32_t wait, uint32_t progress,
|
||||||
const char *message) {
|
enum storage_ui_message_t message) {
|
||||||
// Convert wait to secstr string.
|
// Convert wait to secstr string.
|
||||||
char secstrbuf[] = _("________0 seconds");
|
char secstrbuf[] = _("________0 seconds");
|
||||||
char *secstr = secstrbuf + 9;
|
char *secstr = secstrbuf + 9;
|
||||||
@ -165,7 +165,27 @@ secbool protectPinUiCallback(uint32_t wait, uint32_t progress,
|
|||||||
secstrbuf[16] = 0;
|
secstrbuf[16] = 0;
|
||||||
}
|
}
|
||||||
oledClear();
|
oledClear();
|
||||||
oledDrawStringCenter(OLED_WIDTH / 2, 0 * 9, message, FONT_STANDARD);
|
|
||||||
|
const char *message_str = NULL;
|
||||||
|
switch (message) {
|
||||||
|
case VERIFYING_PIN_MSG:
|
||||||
|
message_str = _("Verifying PIN");
|
||||||
|
break;
|
||||||
|
case PROCESSING_MSG:
|
||||||
|
message_str = _("Processing");
|
||||||
|
break;
|
||||||
|
case STARTING_MSG:
|
||||||
|
message_str = _("Starting up");
|
||||||
|
break;
|
||||||
|
case WRONG_PIN_MSG:
|
||||||
|
message_str = _("Wrong PIN");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
message_str = _("");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
oledDrawStringCenter(OLED_WIDTH / 2, 0 * 9, message_str, FONT_STANDARD);
|
||||||
oledDrawStringCenter(OLED_WIDTH / 2, 2 * 9, _("Please wait"), FONT_STANDARD);
|
oledDrawStringCenter(OLED_WIDTH / 2, 2 * 9, _("Please wait"), FONT_STANDARD);
|
||||||
oledDrawStringCenter(OLED_WIDTH / 2, 3 * 9, secstr, FONT_STANDARD);
|
oledDrawStringCenter(OLED_WIDTH / 2, 3 * 9, secstr, FONT_STANDARD);
|
||||||
oledDrawStringCenter(OLED_WIDTH / 2, 4 * 9, _("to continue ..."),
|
oledDrawStringCenter(OLED_WIDTH / 2, 4 * 9, _("to continue ..."),
|
||||||
|
@ -23,12 +23,13 @@
|
|||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include "messages-common.pb.h"
|
#include "messages-common.pb.h"
|
||||||
#include "secbool.h"
|
#include "secbool.h"
|
||||||
|
#include "storage.h"
|
||||||
|
|
||||||
#define MAX_PASSPHRASE_LEN 50
|
#define MAX_PASSPHRASE_LEN 50
|
||||||
|
|
||||||
bool protectButton(ButtonRequestType type, bool confirm_only);
|
bool protectButton(ButtonRequestType type, bool confirm_only);
|
||||||
secbool protectPinUiCallback(uint32_t wait, uint32_t progress,
|
secbool protectPinUiCallback(uint32_t wait, uint32_t progress,
|
||||||
const char* message);
|
enum storage_ui_message_t message);
|
||||||
bool protectPin(bool use_cached);
|
bool protectPin(bool use_cached);
|
||||||
bool protectChangePin(bool removal);
|
bool protectChangePin(bool removal);
|
||||||
bool protectChangeWipeCode(bool removal);
|
bool protectChangeWipeCode(bool removal);
|
||||||
|
Loading…
Reference in New Issue
Block a user