|
@@ -6,6 +6,7 @@ enum SubmenuIndex {
|
|
|
SubmenuIndexScene1ETH,
|
|
SubmenuIndexScene1ETH,
|
|
|
SubmenuIndexScene1DOGE,
|
|
SubmenuIndexScene1DOGE,
|
|
|
SubmenuIndexScene1New,
|
|
SubmenuIndexScene1New,
|
|
|
|
|
+ SubmenuIndexScene1Import,
|
|
|
SubmenuIndexSettings,
|
|
SubmenuIndexSettings,
|
|
|
};
|
|
};
|
|
|
|
|
|
|
@@ -50,6 +51,12 @@ void flipbip_scene_menu_on_enter(void* context) {
|
|
|
flipbip_scene_menu_submenu_callback,
|
|
flipbip_scene_menu_submenu_callback,
|
|
|
app);
|
|
app);
|
|
|
}
|
|
}
|
|
|
|
|
+ submenu_add_item(
|
|
|
|
|
+ app->submenu,
|
|
|
|
|
+ "Import from mnemonic",
|
|
|
|
|
+ SubmenuIndexScene1Import,
|
|
|
|
|
+ flipbip_scene_menu_submenu_callback,
|
|
|
|
|
+ app);
|
|
|
|
|
|
|
|
submenu_add_item(
|
|
submenu_add_item(
|
|
|
app->submenu, "Settings", SubmenuIndexSettings, flipbip_scene_menu_submenu_callback, app);
|
|
app->submenu, "Settings", SubmenuIndexSettings, flipbip_scene_menu_submenu_callback, app);
|
|
@@ -71,6 +78,7 @@ bool flipbip_scene_menu_on_event(void* context, SceneManagerEvent event) {
|
|
|
} else if(event.type == SceneManagerEventTypeCustom) {
|
|
} else if(event.type == SceneManagerEventTypeCustom) {
|
|
|
if(event.event == SubmenuIndexScene1BTC) {
|
|
if(event.event == SubmenuIndexScene1BTC) {
|
|
|
app->overwrite_saved_seed = 0;
|
|
app->overwrite_saved_seed = 0;
|
|
|
|
|
+ app->import_from_mnemonic = 0;
|
|
|
app->bip44_coin = FlipBipCoinBTC0;
|
|
app->bip44_coin = FlipBipCoinBTC0;
|
|
|
scene_manager_set_scene_state(
|
|
scene_manager_set_scene_state(
|
|
|
app->scene_manager, FlipBipSceneMenu, SubmenuIndexScene1BTC);
|
|
app->scene_manager, FlipBipSceneMenu, SubmenuIndexScene1BTC);
|
|
@@ -78,6 +86,7 @@ bool flipbip_scene_menu_on_event(void* context, SceneManagerEvent event) {
|
|
|
return true;
|
|
return true;
|
|
|
} else if(event.event == SubmenuIndexScene1ETH) {
|
|
} else if(event.event == SubmenuIndexScene1ETH) {
|
|
|
app->overwrite_saved_seed = 0;
|
|
app->overwrite_saved_seed = 0;
|
|
|
|
|
+ app->import_from_mnemonic = 0;
|
|
|
app->bip44_coin = FlipBipCoinETH60;
|
|
app->bip44_coin = FlipBipCoinETH60;
|
|
|
scene_manager_set_scene_state(
|
|
scene_manager_set_scene_state(
|
|
|
app->scene_manager, FlipBipSceneMenu, SubmenuIndexScene1ETH);
|
|
app->scene_manager, FlipBipSceneMenu, SubmenuIndexScene1ETH);
|
|
@@ -85,6 +94,7 @@ bool flipbip_scene_menu_on_event(void* context, SceneManagerEvent event) {
|
|
|
return true;
|
|
return true;
|
|
|
} else if(event.event == SubmenuIndexScene1DOGE) {
|
|
} else if(event.event == SubmenuIndexScene1DOGE) {
|
|
|
app->overwrite_saved_seed = 0;
|
|
app->overwrite_saved_seed = 0;
|
|
|
|
|
+ app->import_from_mnemonic = 0;
|
|
|
app->bip44_coin = FlipBipCoinDOGE3;
|
|
app->bip44_coin = FlipBipCoinDOGE3;
|
|
|
scene_manager_set_scene_state(
|
|
scene_manager_set_scene_state(
|
|
|
app->scene_manager, FlipBipSceneMenu, SubmenuIndexScene1DOGE);
|
|
app->scene_manager, FlipBipSceneMenu, SubmenuIndexScene1DOGE);
|
|
@@ -92,10 +102,16 @@ bool flipbip_scene_menu_on_event(void* context, SceneManagerEvent event) {
|
|
|
return true;
|
|
return true;
|
|
|
} else if(event.event == SubmenuIndexScene1New) {
|
|
} else if(event.event == SubmenuIndexScene1New) {
|
|
|
app->overwrite_saved_seed = 1;
|
|
app->overwrite_saved_seed = 1;
|
|
|
|
|
+ app->import_from_mnemonic = 0;
|
|
|
scene_manager_set_scene_state(
|
|
scene_manager_set_scene_state(
|
|
|
app->scene_manager, FlipBipSceneMenu, SubmenuIndexScene1New);
|
|
app->scene_manager, FlipBipSceneMenu, SubmenuIndexScene1New);
|
|
|
scene_manager_next_scene(app->scene_manager, FlipBipSceneScene_1);
|
|
scene_manager_next_scene(app->scene_manager, FlipBipSceneScene_1);
|
|
|
return true;
|
|
return true;
|
|
|
|
|
+ } else if(event.event == SubmenuIndexScene1Import) {
|
|
|
|
|
+ app->import_from_mnemonic = 1;
|
|
|
|
|
+ app->input_state = FlipBipTextInputMnemonic;
|
|
|
|
|
+ view_dispatcher_switch_to_view(app->view_dispatcher, FlipBipViewIdTextInput);
|
|
|
|
|
+ return true;
|
|
|
} else if(event.event == SubmenuIndexSettings) {
|
|
} else if(event.event == SubmenuIndexSettings) {
|
|
|
scene_manager_set_scene_state(
|
|
scene_manager_set_scene_state(
|
|
|
app->scene_manager, FlipBipSceneMenu, SubmenuIndexSettings);
|
|
app->scene_manager, FlipBipSceneMenu, SubmenuIndexSettings);
|