diff --git a/baking/src/tezos_baking/tezos_setup_wizard.py b/baking/src/tezos_baking/tezos_setup_wizard.py index c2704abbe..af1f35355 100644 --- a/baking/src/tezos_baking/tezos_setup_wizard.py +++ b/baking/src/tezos_baking/tezos_setup_wizard.py @@ -709,12 +709,22 @@ def import_baker_key(self): if self.config["key_import_mode"] == "ledger": try: + print( + color( + "Waiting for your respond to the prompt on your Ledger Device...", + color_green, + ) + ) proc_call( f"sudo -u tezos {suppress_warning_text} octez-client {tezos_client_options} " f"setup ledger to bake for {baker_alias} --main-hwm {self.get_current_head_level()}" ) baker_set_up = True - except PermissionError: + except Exception as e: + print("Something went wrong when calling octez-client:") + print(str(e)) + print() + print("Please check your input and try again.") print("Going back to the import mode selection.") else: baker_set_up = True @@ -723,6 +733,13 @@ def register_baker(self): print() tezos_client_options = self.get_tezos_client_options() baker_alias = self.config["baker_alias"] + if self.config["key_import_mode"] == "ledger": + print( + color( + "Waiting for your respond to the prompt on your Ledger Device...", + color_green, + ) + ) proc_call( f"sudo -u tezos {suppress_warning_text} octez-client {tezos_client_options} " f"register key {baker_alias} as delegate" diff --git a/baking/src/tezos_baking/wizard_structure.py b/baking/src/tezos_baking/wizard_structure.py index 601a24150..ccd6b3318 100644 --- a/baking/src/tezos_baking/wizard_structure.py +++ b/baking/src/tezos_baking/wizard_structure.py @@ -271,9 +271,17 @@ def import_key(self, key_mode_query, ledger_app=None): else: print(f"Please open the Tezos {ledger_app} app on your ledger or") print("press Ctrl+C to go back to the key import mode selection.") + print( + color( + "Waiting for the Ledger Device to appear...", color_green + ), + end="", + flush=True, + ) ledgers_derivations = wait_for_ledger_app( ledger_app, self.config["client_data_dir"] ) + print() if ledgers_derivations is None: print("Going back to the import mode selection.") continue @@ -318,6 +326,13 @@ def import_key(self, key_mode_query, ledger_app=None): ) else: baker_ledger_url = self.config["ledger_derivation"] + + print( + color( + "Waiting for your respond to the prompt on your Ledger Device...", + color_green, + ) + ) proc_call( f"sudo -u tezos {suppress_warning_text} octez-client {tezos_client_options} " f"import secret key {baker_alias} {baker_ledger_url} --force"