diff --git a/nucypher/cli/commands/alice.py b/nucypher/cli/commands/alice.py index d3f81f58b..5861542ac 100644 --- a/nucypher/cli/commands/alice.py +++ b/nucypher/cli/commands/alice.py @@ -330,7 +330,7 @@ def config(general_config, config_file, full_config_options): emitter = setup_emitter(general_config) if not config_file: config_file = select_config_file(emitter=emitter, - checksum_address=full_config_options.pay_with, + checksum_address=full_config_options.config_options.pay_with, config_class=AliceConfiguration) updates = full_config_options.get_updates() get_or_update_configuration(emitter=emitter, diff --git a/nucypher/cli/commands/bob.py b/nucypher/cli/commands/bob.py index f35bb684e..0d1d87ec1 100644 --- a/nucypher/cli/commands/bob.py +++ b/nucypher/cli/commands/bob.py @@ -73,7 +73,7 @@ class BobConfigOptions: self.provider_uri = provider_uri self.signer_uri = signer_uri - self.gas_strategy = gas_strategy, + self.gas_strategy = gas_strategy self.domains = {network} if network else None self.registry_filepath = registry_filepath self.checksum_address = checksum_address @@ -116,6 +116,7 @@ class BobConfigOptions: checksum_address = self.checksum_address if not checksum_address and not self.federated_only: checksum_address = select_client_account(emitter=emitter, + signer_uri=self.signer_uri, provider_uri=self.provider_uri) # TODO: See #1888 return BobConfiguration.generate( diff --git a/nucypher/cli/commands/ursula.py b/nucypher/cli/commands/ursula.py index 2e57d7f86..daf01c8dd 100644 --- a/nucypher/cli/commands/ursula.py +++ b/nucypher/cli/commands/ursula.py @@ -174,13 +174,17 @@ class UrsulaConfigOptions: def generate_config(self, emitter, config_root, force): - assert not self.dev # TODO: Raise instead + if self.dev: + raise RuntimeError('Persistent configurations cannot be created in development mode.') worker_address = self.worker_address if (not worker_address) and not self.federated_only: if not worker_address: prompt = "Select worker account" - worker_address = select_client_account(emitter=emitter, prompt=prompt, provider_uri=self.provider_uri, signer_uri=self.signer_uri) + worker_address = select_client_account(emitter=emitter, + prompt=prompt, + provider_uri=self.provider_uri, + signer_uri=self.signer_uri) rest_host = self.rest_host if not rest_host: @@ -258,8 +262,11 @@ class UrsulaCharacterOptions: def create_character(self, emitter, config_file, json_ipc, load_seednodes=True): + # TODO: embed compatibility layer? ursula_config = self.config_options.create_config(emitter, config_file) is_clef = ClefSigner.is_valid_clef_uri(self.config_options.signer_uri) + + # TODO: Oh client_password = None if not ursula_config.federated_only: if not self.config_options.dev and not json_ipc and not is_clef: diff --git a/nucypher/cli/utils.py b/nucypher/cli/utils.py index 94375714f..8770b27f2 100644 --- a/nucypher/cli/utils.py +++ b/nucypher/cli/utils.py @@ -88,13 +88,9 @@ def make_cli_character(character_config, # # Produce Character - try: - CHARACTER = character_config(known_nodes=teacher_nodes, - network_middleware=character_config.network_middleware, - **config_args) - except (CryptoError, ValueError): - raise character_config.keyring.AuthenticationFailed(f"Failed to unlock nucypher keyring. " - "Are you sure you provided the correct password?") + CHARACTER = character_config(known_nodes=teacher_nodes, + network_middleware=character_config.network_middleware, + **config_args) # # Post-Init