Skip to content

Commit

Permalink
Merge pull request #459 from Cypherock/wallet-extend-character-set
Browse files Browse the repository at this point in the history
feat: Extend wallet name charset to alpha-numeric
  • Loading branch information
ujjwal-cyph authored Jan 20, 2024
2 parents 693ee56 + a6b65dc commit a8b02aa
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 6 deletions.
3 changes: 3 additions & 0 deletions common/coin_support/wallet.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@
/// Unsets the bit that corresponds to Arbitrary Data
#define WALLET_UNSET_ARBITRARY_DATA(n) (n &= (~4))

/// @brief Character set for wallet name
#define WALLET_NAME_CHARSET ALPHA_NUMERIC

typedef enum wallet_name_opt {
WALLET_NAME_ONE = 1,
WALLET_NAME_TWO,
Expand Down
7 changes: 5 additions & 2 deletions src/level_three/add_wallet/tasks/tasks_arbitrary_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,11 @@ void tasks_arbitrary_data() {

switch (flow_level.level_three) {
case ARBITRARY_DATA_NAME_INPUT: {
input_text_init(
ALPHABET, ui_text_enter_wallet_name, 2, DATA_TYPE_TEXT, 15);
input_text_init(WALLET_NAME_CHARSET,
ui_text_enter_wallet_name,
2,
DATA_TYPE_TEXT,
15);
} break;

case ARBITRARY_DATA_NAME_CONFIRM: {
Expand Down
7 changes: 5 additions & 2 deletions src/wallet/create_new_wallet_flow.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,11 @@ new_wallet_state_e new_wallet_state_handler(new_wallet_state_e current_state) {

switch (current_state) {
case NAME_INPUT: {
input_text_init(
ALPHABET, ui_text_enter_wallet_name, 2, DATA_TYPE_TEXT, 15);
input_text_init(WALLET_NAME_CHARSET,
ui_text_enter_wallet_name,
2,
DATA_TYPE_TEXT,
15);
next_state = get_state_on_input_scr(NAME_INPUT, EARLY_EXIT, TIMED_OUT);

if (NAME_INPUT != next_state) {
Expand Down
7 changes: 5 additions & 2 deletions src/wallet/restore_seed_phrase_flow.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,11 @@ restore_wallet_state_e restore_wallet_state_handler(

switch (current_state) {
case NAME_INPUT: {
input_text_init(
ALPHABET, ui_text_enter_wallet_name, 2, DATA_TYPE_TEXT, 15);
input_text_init(WALLET_NAME_CHARSET,
ui_text_enter_wallet_name,
2,
DATA_TYPE_TEXT,
15);
next_state = get_state_on_input_scr(NAME_INPUT, EARLY_EXIT, TIMED_OUT);

if (NAME_INPUT != next_state) {
Expand Down

0 comments on commit a8b02aa

Please sign in to comment.