Explorar o código

fix: comments

Struan Clark hai 1 ano
pai
achega
9f9bce59bc
Modificáronse 5 ficheiros con 8 adicións e 5 borrados
  1. 1 1
      flipbip.h
  2. 1 1
      flipbip_coins.c
  3. 1 1
      flipbip_coins.h
  4. 4 1
      scenes/flipbip_scene_menu.c
  5. 1 1
      views/flipbip_scene_1.c

+ 1 - 1
flipbip.h

@@ -14,7 +14,6 @@
 #include <gui/modules/text_input.h>
 #include "scenes/flipbip_scene.h"
 #include "views/flipbip_scene_1.h"
-
 #include "flipbip_coins.h"
 
 #define FLIPBIP_VERSION  "v1.18"
@@ -81,6 +80,7 @@ typedef enum {
     FlipBipStatusMnemonicCheckError = 13,
 } FlipBipStatus;
 
+// There's a scene ID for each coin, then these scenes are after so need to offset the first entry by at least NUM_COINS
 typedef enum {
     SubmenuIndexScene1New = NUM_COINS + 1,
     SubmenuIndexScene1Renew,

+ 1 - 1
flipbip_coins.c

@@ -8,7 +8,7 @@ const uint32_t COIN_INFO_ARRAY[NUM_COINS][COIN_INFO_SIZE] = {
     {133, 0x0488ade4, 0x0488b21e, 0x1cb8, 0x80, CoinTypeBTC0},
 };
 
-// coin_label, derivation_path, coin_name, static_prefix
+// coin_label, derivation_path, coin_name, static_prefix ("_" for none)
 const char* COIN_TEXT_ARRAY[NUM_COINS][COIN_TEXT_SIZE] = {
     {"BTC", "m/44'/0'/0'/0", "bitcoin:", "_"},
     {"ETH", "m/44'/60'/0'/0", "ethereum:", "_"},

+ 1 - 1
flipbip_coins.h

@@ -27,5 +27,5 @@ extern const uint32_t COIN_INFO_ARRAY[NUM_COINS][COIN_INFO_SIZE];
 #define COIN_TEXT_NAME   2
 #define COIN_TEXT_PREFIX 3
 
-// coin_label, derivation_path, coin_name, static_prefix
+// coin_label, derivation_path, coin_name, static_prefix ("_" for none)
 extern const char* COIN_TEXT_ARRAY[NUM_COINS][COIN_TEXT_SIZE];

+ 4 - 1
scenes/flipbip_scene_menu.c

@@ -24,7 +24,10 @@ void flipbip_scene_menu_on_enter(void* context) {
        flipbip_has_file(FlipBipFileDat, NULL, false)) {
         for(size_t coin_type = 0; coin_type < NUM_COINS; coin_type++) {
             char wallet_menu_item[17] = "View      wallet";
-            strcpy(wallet_menu_item + 5, COIN_TEXT_ARRAY[coin_type][COIN_TEXT_LABEL]);
+            strncpy(
+                wallet_menu_item + 5,
+                COIN_TEXT_ARRAY[coin_type][COIN_TEXT_LABEL],
+                strlen(COIN_TEXT_ARRAY[coin_type][COIN_TEXT_LABEL]));
             submenu_add_item(
                 app->submenu,
                 wallet_menu_item,

+ 1 - 1
views/flipbip_scene_1.c

@@ -641,7 +641,7 @@ void flipbip_scene_1_enter(void* context) {
     }
 
     // Wait a beat to allow the display time to update to the loading screen
-    furi_thread_flags_wait(0, FuriFlagWaitAny, 20);
+    furi_thread_flags_wait(0, FuriFlagWaitAny, 50);
 
     //flipbip_play_happy_bump(app);
     //notification_message(app->notification, &sequence_blink_cyan_100);