Skip to content

Commit bb6db8d

Browse files
committed
cleanup
1 parent 3602004 commit bb6db8d

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

views/flipbip_scene_1.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ static void flipbip_scene_1_draw_seed(FlipBipScene1Model* const model) {
133133
free(seed_working);
134134
}
135135

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) {
137137
// Constants for Bitcoin address generation
138138
const char addr_version = 0x00;
139139
//const char wif_version = 0x80;
@@ -177,6 +177,7 @@ void flipbip_scene_1_draw(Canvas* canvas, FlipBipScene1Model* model) {
177177
canvas_clear(canvas);
178178
canvas_set_color(canvas, ColorBlack);
179179

180+
flipbip_scene_1_clear_text();
180181
if (model->page == 1) {
181182
const char* info = "-Scroll pages with up/down-"
182183
"p1,2) Mnemonic/Seed "
@@ -242,7 +243,7 @@ static void flipbip_scene_1_model_init(FlipBipScene1Model* const model, const in
242243

243244
// Generate a random mnemonic using trezor-crypto
244245
model->strength = strength;
245-
const char *mnemonic = mnemonic_generate(model->strength);
246+
model->mnemonic = mnemonic_generate(model->strength);
246247

247248
// test mnemonic
248249
//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
252253

253254
// Generate a BIP32 root key from the mnemonic
254255

255-
// //bool root_set = false;
256256
HDNode *root = malloc(sizeof(HDNode));
257257
hdnode_from_seed(model->seed, 64, SECP256K1_NAME, root);
258-
// //root_set = true;
259258

260259
// m/44'/0'/0'/0
261260
uint32_t purpose = 44;
@@ -266,7 +265,6 @@ static void flipbip_scene_1_model_init(FlipBipScene1Model* const model, const in
266265
// constants for Bitcoin
267266
const uint32_t version_public = 0x0488b21e;
268267
const uint32_t version_private = 0x0488ade4;
269-
//const char addr_version = 0x00, wif_version = 0x80;
270268

271269
// buffer for key serialization
272270
const size_t buflen = 128;
@@ -318,6 +316,7 @@ static void flipbip_scene_1_model_init(FlipBipScene1Model* const model, const in
318316
model->xpub_extended = xpub_ext;
319317

320318
model->node = node;
319+
321320
model->page = 1;
322321

323322
#if USE_BIP39_CACHE

0 commit comments

Comments
 (0)