From 04205387891d7f18bacbe9a00bee851feaeba144 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrei=20B=C4=83ncioiu?= Date: Mon, 7 Aug 2023 15:35:55 +0300 Subject: [PATCH] Adjust check of CLI args (proxy). --- multiversx_sdk_cli/cli_shared.py | 3 +++ multiversx_sdk_cli/config.py | 3 +++ 2 files changed, 6 insertions(+) diff --git a/multiversx_sdk_cli/cli_shared.py b/multiversx_sdk_cli/cli_shared.py index af14f024..a0f655a0 100644 --- a/multiversx_sdk_cli/cli_shared.py +++ b/multiversx_sdk_cli/cli_shared.py @@ -170,6 +170,9 @@ def prepare_guardian_account(args: Any): def prepare_nonce_in_args(args: Any): + if args.recall_nonce and not args.proxy: + raise ArgumentsNotProvidedError("When using `--recall-nonce`, `--proxy` must be provided, as well") + if args.recall_nonce: account = prepare_account(args) account.sync_nonce(ProxyNetworkProvider(args.proxy)) diff --git a/multiversx_sdk_cli/config.py b/multiversx_sdk_cli/config.py index 9ec63732..edc10bde 100644 --- a/multiversx_sdk_cli/config.py +++ b/multiversx_sdk_cli/config.py @@ -216,6 +216,9 @@ def add_config_args(argv: List[str]) -> List[str]: def check_for_deprecated_args(args: List[str]) -> None: + if "proxy" in args: + show_warning("Providing `proxy` in the configuration file is deprecated. It will not be used. Please remove it!") + if "chainID" in args: show_warning("Providing `chainID` in the configuration file is deprecated. It will not be used. Please remove it!")