From 20878290a0a34de24328c74dbed31323e2455ff0 Mon Sep 17 00:00:00 2001 From: Pan Long Date: Mon, 30 Aug 2021 01:02:48 +0800 Subject: [PATCH 1/2] Surround "unlimited" by double quotes in build config. --- freqtrade/commands/build_config_commands.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/freqtrade/commands/build_config_commands.py b/freqtrade/commands/build_config_commands.py index 852cab92e..7e3534921 100644 --- a/freqtrade/commands/build_config_commands.py +++ b/freqtrade/commands/build_config_commands.py @@ -66,16 +66,22 @@ def ask_user_config() -> Dict[str, Any]: { "type": "text", "name": "stake_amount", - "message": "Please insert your stake amount:", + "message": f"Please insert your stake amount (Integer or '{UNLIMITED_STAKE_AMOUNT}'):", "default": "0.01", "validate": lambda val: val == UNLIMITED_STAKE_AMOUNT or validate_is_float(val), + "filter": lambda val: '"' + UNLIMITED_STAKE_AMOUNT + '"' + if val == UNLIMITED_STAKE_AMOUNT + else val }, { "type": "text", "name": "max_open_trades", "message": f"Please insert max_open_trades (Integer or '{UNLIMITED_STAKE_AMOUNT}'):", "default": "3", - "validate": lambda val: val == UNLIMITED_STAKE_AMOUNT or validate_is_int(val) + "validate": lambda val: val == UNLIMITED_STAKE_AMOUNT or validate_is_int(val), + "filter": lambda val: '"' + UNLIMITED_STAKE_AMOUNT + '"' + if val == UNLIMITED_STAKE_AMOUNT + else val }, { "type": "text", From 2a0c95a2e7b2a75929cd1b017ce69d44805bab6c Mon Sep 17 00:00:00 2001 From: Matthias Date: Mon, 30 Aug 2021 20:00:52 +0200 Subject: [PATCH 2/2] Update freqtrade/commands/build_config_commands.py --- freqtrade/commands/build_config_commands.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/freqtrade/commands/build_config_commands.py b/freqtrade/commands/build_config_commands.py index 7e3534921..1fe90e83a 100644 --- a/freqtrade/commands/build_config_commands.py +++ b/freqtrade/commands/build_config_commands.py @@ -66,7 +66,7 @@ def ask_user_config() -> Dict[str, Any]: { "type": "text", "name": "stake_amount", - "message": f"Please insert your stake amount (Integer or '{UNLIMITED_STAKE_AMOUNT}'):", + "message": f"Please insert your stake amount (Number or '{UNLIMITED_STAKE_AMOUNT}'):", "default": "0.01", "validate": lambda val: val == UNLIMITED_STAKE_AMOUNT or validate_is_float(val), "filter": lambda val: '"' + UNLIMITED_STAKE_AMOUNT + '"'