@@ -133,7 +133,7 @@ static void flipbip_scene_1_draw_seed(FlipBipScene1Model* const model) {
133
133
free (seed_working );
134
134
}
135
135
136
- static void flipbip_scene_1_draw_address (HDNode * const node , uint32_t addr_index ) {
136
+ static void flipbip_scene_1_draw_address (const HDNode * node , uint32_t addr_index ) {
137
137
// Constants for Bitcoin address generation
138
138
const char addr_version = 0x00 ;
139
139
//const char wif_version = 0x80;
@@ -177,6 +177,7 @@ void flipbip_scene_1_draw(Canvas* canvas, FlipBipScene1Model* model) {
177
177
canvas_clear (canvas );
178
178
canvas_set_color (canvas , ColorBlack );
179
179
180
+ flipbip_scene_1_clear_text ();
180
181
if (model -> page == 1 ) {
181
182
const char * info = "-Scroll pages with up/down-"
182
183
"p1,2) Mnemonic/Seed "
@@ -242,7 +243,7 @@ static void flipbip_scene_1_model_init(FlipBipScene1Model* const model, const in
242
243
243
244
// Generate a random mnemonic using trezor-crypto
244
245
model -> strength = strength ;
245
- const char * mnemonic = mnemonic_generate (model -> strength );
246
+ model -> mnemonic = mnemonic_generate (model -> strength );
246
247
247
248
// test mnemonic
248
249
//model->mnemonic = "wealth budget salt video delay obey neutral tail sure soda hold rubber joy movie boat raccoon tornado noise off inmate payment patch group topple";
@@ -252,10 +253,8 @@ static void flipbip_scene_1_model_init(FlipBipScene1Model* const model, const in
252
253
253
254
// Generate a BIP32 root key from the mnemonic
254
255
255
- // //bool root_set = false;
256
256
HDNode * root = malloc (sizeof (HDNode ));
257
257
hdnode_from_seed (model -> seed , 64 , SECP256K1_NAME , root );
258
- // //root_set = true;
259
258
260
259
// m/44'/0'/0'/0
261
260
uint32_t purpose = 44 ;
@@ -266,7 +265,6 @@ static void flipbip_scene_1_model_init(FlipBipScene1Model* const model, const in
266
265
// constants for Bitcoin
267
266
const uint32_t version_public = 0x0488b21e ;
268
267
const uint32_t version_private = 0x0488ade4 ;
269
- //const char addr_version = 0x00, wif_version = 0x80;
270
268
271
269
// buffer for key serialization
272
270
const size_t buflen = 128 ;
@@ -318,6 +316,7 @@ static void flipbip_scene_1_model_init(FlipBipScene1Model* const model, const in
318
316
model -> xpub_extended = xpub_ext ;
319
317
320
318
model -> node = node ;
319
+
321
320
model -> page = 1 ;
322
321
323
322
#if USE_BIP39_CACHE
0 commit comments