瀏覽代碼

turn off options to shrink binary size

Struan Clark 2 年之前
父節點
當前提交
ea660ebe0b
共有 2 個文件被更改,包括 5 次插入3 次删除
  1. 3 3
      crypto/options.h
  2. 2 0
      views/flipbip_scene_1.c

+ 3 - 3
crypto/options.h

@@ -45,19 +45,19 @@
 
 // implement BIP32 caching
 #ifndef USE_BIP32_CACHE
-#define USE_BIP32_CACHE 1
+#define USE_BIP32_CACHE 0
 #define BIP32_CACHE_SIZE 10
 #define BIP32_CACHE_MAXDEPTH 8
 #endif
 
 // support constructing BIP32 nodes from ed25519 and curve25519 curves.
 #ifndef USE_BIP32_25519_CURVES
-#define USE_BIP32_25519_CURVES 1
+#define USE_BIP32_25519_CURVES 0
 #endif
 
 // implement BIP39 caching
 #ifndef USE_BIP39_CACHE
-#define USE_BIP39_CACHE 1
+#define USE_BIP39_CACHE 0
 #define BIP39_CACHE_SIZE 4
 #endif
 

+ 2 - 0
views/flipbip_scene_1.c

@@ -243,8 +243,10 @@ static void flipbip_scene_1_model_init(FlipBipScene1Model* const model, const in
     memzero(seed, sizeof(seed));
     free(seed);
 
+#if USE_BIP39_CACHE
     // Clear the BIP39 cache
     bip39_cache_clear();
+#endif
 }
 
 bool flipbip_scene_1_input(InputEvent* event, void* context) {