Skip to content

Commit 4054108

Browse files
authored
Merge pull request #10 from xtruan/develop
Add header labels to input text
2 parents 6e69746 + 35209cc commit 4054108

File tree

3 files changed

+12
-7
lines changed

3 files changed

+12
-7
lines changed

flipbip.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#include "views/flipbip_startscreen.h"
1616
#include "views/flipbip_scene_1.h"
1717

18-
#define FLIPBIP_VERSION "v0.0.8"
18+
#define FLIPBIP_VERSION "v0.0.9"
1919

2020
#define COIN_BTC 0
2121
#define COIN_DOGE 3

scenes/flipbip_scene_menu.c

+1
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ bool flipbip_scene_menu_on_event(void* context, SceneManagerEvent event) {
111111
} else if(event.event == SubmenuIndexScene1Import) {
112112
app->import_from_mnemonic = 1;
113113
app->input_state = FlipBipTextInputMnemonic;
114+
text_input_set_header_text(app->text_input, "Enter mnemonic phrase");
114115
view_dispatcher_switch_to_view(app->view_dispatcher, FlipBipViewIdTextInput);
115116
return true;
116117
} else if(event.event == SubmenuIndexSettings) {

scenes/flipbip_scene_settings.c

+10-6
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,21 @@
33
// From: lib/crypto
44
#include <memzero.h>
55

6+
#define TEXT_LABEL_ON "ON"
7+
#define TEXT_LABEL_OFF "OFF"
8+
69
const char* const haptic_text[2] = {
7-
"OFF",
8-
"ON",
10+
TEXT_LABEL_OFF,
11+
TEXT_LABEL_ON,
912
};
1013
const uint32_t haptic_value[2] = {
1114
FlipBipHapticOff,
1215
FlipBipHapticOn,
1316
};
1417

1518
const char* const led_text[2] = {
16-
"OFF",
17-
"ON",
19+
TEXT_LABEL_OFF,
20+
TEXT_LABEL_ON,
1821
};
1922
const uint32_t led_value[2] = {
2023
FlipBipLedOff,
@@ -33,8 +36,8 @@ const uint32_t bip39_strength_value[3] = {
3336
};
3437

3538
const char* const passphrase_text[2] = {
36-
"OFF",
37-
"ON",
39+
TEXT_LABEL_OFF,
40+
TEXT_LABEL_ON,
3841
};
3942
const uint32_t passphrase_value[2] = {
4043
FlipBipPassphraseOff,
@@ -70,6 +73,7 @@ static void flipbip_scene_settings_set_passphrase(VariableItem* item) {
7073

7174
if(app->passphrase == FlipBipPassphraseOn) {
7275
app->input_state = FlipBipTextInputPassphrase;
76+
text_input_set_header_text(app->text_input, "Enter BIP39 passphrase");
7377
view_dispatcher_switch_to_view(app->view_dispatcher, FlipBipViewIdTextInput);
7478
} else {
7579
memzero(app->passphrase_text, TEXT_BUFFER_SIZE);

0 commit comments

Comments
 (0)