Make ursula CLI ask for worker account password

pull/1167/head
David Núñez 2019-07-29 12:29:39 +02:00 committed by Kieran Prasch
parent 460dd6a660
commit eed4c0937d
No known key found for this signature in database
GPG Key ID: 199AB839D4125A62
1 changed files with 12 additions and 3 deletions

View File

@ -26,7 +26,11 @@ from nucypher.blockchain.eth.registry import EthereumContractRegistry
from nucypher.blockchain.eth.utils import datetime_at_period
from nucypher.characters.banners import URSULA_BANNER
from nucypher.cli import actions, painting
from nucypher.cli.actions import get_nucypher_password, select_client_account
from nucypher.cli.actions import (
get_nucypher_password,
select_client_account,
get_client_password
)
from nucypher.cli.config import nucypher_click_config
from nucypher.cli.processes import UrsulaCommandProtocol
from nucypher.cli.types import (
@ -247,13 +251,18 @@ def ursula(click_config,
#
# Make Ursula
#
# TODO: OH MY INDEED
client_password = None
if not ursula_config.federated_only:
if not dev and not click_config.json_ipc:
client_password = get_client_password(checksum_address=ursula_config.worker_address)
URSULA = actions.make_cli_character(character_config=ursula_config,
click_config=click_config,
min_stake=min_stake,
teacher_uri=teacher_uri,
dev=dev,
lonely=lonely)
lonely=lonely,
client_password=client_password)
#
# Authenticated Action Switch