Improve remove credentials

This commit is contained in:
Matthias 2023-05-13 08:09:00 +02:00
parent 6541782758
commit b2a3fe6879

View File

@ -4,6 +4,7 @@ import time
from functools import wraps from functools import wraps
from typing import Any, Callable, Optional, TypeVar, cast, overload from typing import Any, Callable, Optional, TypeVar, cast, overload
from freqtrade.constants import Config
from freqtrade.exceptions import DDosProtection, RetryableOrderError, TemporaryError from freqtrade.exceptions import DDosProtection, RetryableOrderError, TemporaryError
from freqtrade.mixins import LoggingMixin from freqtrade.mixins import LoggingMixin
@ -87,7 +88,7 @@ EXCHANGE_HAS_OPTIONAL = [
] ]
def remove_credentials(config) -> None: def remove_credentials(config: Config) -> None:
""" """
Removes exchange keys from the configuration and specifies dry-run Removes exchange keys from the configuration and specifies dry-run
Used for backtesting / hyperopt / edge and utils. Used for backtesting / hyperopt / edge and utils.
@ -95,6 +96,7 @@ def remove_credentials(config) -> None:
""" """
if config.get('dry_run', False): if config.get('dry_run', False):
config['exchange']['key'] = '' config['exchange']['key'] = ''
config['exchange']['apiKey'] = ''
config['exchange']['secret'] = '' config['exchange']['secret'] = ''
config['exchange']['password'] = '' config['exchange']['password'] = ''
config['exchange']['uid'] = '' config['exchange']['uid'] = ''