From 54cd9886eacccaaaca99771841e87e06280b956e Mon Sep 17 00:00:00 2001 From: "alexey.stratulat" <alexey.stratulat@demlabs.net> Date: Thu, 11 Jul 2024 12:38:22 +0000 Subject: [PATCH] Bugfix 12239 --- modules/net/dap_chain_node_cli_cmd.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/net/dap_chain_node_cli_cmd.c b/modules/net/dap_chain_node_cli_cmd.c index 05b1ea65d4..e88688ca77 100644 --- a/modules/net/dap_chain_node_cli_cmd.c +++ b/modules/net/dap_chain_node_cli_cmd.c @@ -2082,7 +2082,8 @@ int l_arg_index = 1, l_rc, cmd_num = CMD_NONE; l_sign_types[0] = dap_sign_type_from_str(l_sign_type_str); if (l_sign_types[0].type == SIG_TYPE_NULL){ dap_json_rpc_error_add(DAP_CHAIN_NODE_CLI_COM_TX_WALLET_UNKNOWN_SIGN_ERR, - "Unknown signature type, please use:\n sig_picnic\n sig_dil\n sig_falcon\n sig_multi\n sig_multi2\n",l_wallet_name); + "'%s' unknown signature type, please use:\n%s", + l_sign_type_str, dap_sign_get_str_recommended_types()); json_object_put(json_arr_out); return DAP_CHAIN_NODE_CLI_COM_TX_WALLET_UNKNOWN_SIGN_ERR; } @@ -2098,7 +2099,8 @@ int l_arg_index = 1, l_rc, cmd_num = CMD_NONE; } if (!l_sign_count) { dap_json_rpc_error_add(DAP_CHAIN_NODE_CLI_COM_TX_WALLET_UNKNOWN_SIGN_ERR, - "Unknown signature type, please use:\n sig_picnic\n sig_dil\n sig_falcon\n sig_multi\n sig_multi2\n",l_wallet_name); + "'%s' unknown signature type, please use:\n%s", + l_sign_type_str, dap_sign_get_str_recommended_types()); json_object_put(json_arr_out); return DAP_CHAIN_NODE_CLI_COM_TX_WALLET_UNKNOWN_SIGN_ERR; } @@ -2109,7 +2111,7 @@ int l_arg_index = 1, l_rc, cmd_num = CMD_NONE; // Check unsupported tesla and bliss algorithm for (size_t i = 0; i < l_sign_count; ++i) { - if (l_sign_types[i].type == SIG_TYPE_TESLA || l_sign_types[i].type == SIG_TYPE_BLISS|| l_sign_types[i].type == SIG_TYPE_PICNIC) { + if (dap_sign_type_is_depricated(l_sign_types[i])) { if (l_restore_opt || l_restore_legacy_opt) { dap_json_rpc_error_add(DAP_CHAIN_NODE_CLI_COM_TX_WALLET_UNKNOWN_SIGN_ERR, "CAUTION!!! CAUTION!!! CAUTION!!!\nThe Bliss, Tesla and Picnic signatures are deprecated. We recommend you to create a new wallet with another available signature and transfer funds there.\n"); -- GitLab