Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion croco_cli/cli/change.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def custom():
database = Database()

custom_accounts = database.get_custom_accounts()
if not len(custom_accounts):
if not custom_accounts or not len(custom_accounts):
echo_error('There are no custom accounts in the database to change.')
return

Expand Down
8 changes: 5 additions & 3 deletions croco_cli/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def _show_key_mode(
exit_option = Option(
name='Exit',
description='Return to the terminal',
handler=lambda: None # No-op handler
handler=_term.clear()
)

options.append(exit_option)
Expand Down Expand Up @@ -109,9 +109,11 @@ def _show_key_mode(
current_option += 1
else:
current_option = 0
elif key == '\n':
elif key == '\n' or key.name == 'KEY_ENTER':
selected_option = options[current_option]
return selected_option['handler']()
break

return selected_option['handler']()


def show_key_mode(
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = 'croco_cli'
version = '0.2.0'
version = '0.2.1'
description = 'The CLI for developing Web3-based projects in Croco Factory'
authors = ['Alexey <axbelenkov@gmail.com>']
license = 'MIT'
Expand Down