diff --git a/modules/net/dap_chain_node_cli_cmd.c b/modules/net/dap_chain_node_cli_cmd.c index 6c69629d8ad7bd1e505d582eb4518a1235793b8b..b1746b4ea64faf4cb54b81d39b7e61ab77e2aa32 100644 --- a/modules/net/dap_chain_node_cli_cmd.c +++ b/modules/net/dap_chain_node_cli_cmd.c @@ -1800,7 +1800,6 @@ int l_arg_index = 1, l_rc, cmd_num = CMD_NONE; } dap_chain_net_t * l_net = l_net_name ? dap_chain_net_by_name(l_net_name) : NULL; - //dap_string_t *l_string_ret = dap_string_new(NULL); dap_chain_wallet_t *l_wallet = NULL; dap_chain_addr_t *l_addr = NULL; @@ -1928,6 +1927,24 @@ int l_arg_index = 1, l_rc, cmd_num = CMD_NONE; size_t l_l_addr_tokens_size = 0; char **l_l_addr_tokens = NULL; dap_ledger_addr_get_token_ticker_all(l_ledger, l_addr, &l_l_addr_tokens, &l_l_addr_tokens_size); + if (l_wallet) { + //Get sign for wallet + json_object *l_jobj_sings = NULL; + dap_chain_wallet_internal_t *l_w_internal = DAP_CHAIN_WALLET_INTERNAL(l_wallet); + if (l_w_internal->certs_count == 1) { + l_jobj_sings = json_object_new_string(dap_enc_get_type_name(l_w_internal->certs[0]->enc_key->type)); + } else { + dap_string_t *l_str_signs = dap_string_new(""); + for (size_t i = 0; i < l_w_internal->certs_count; i++) { + dap_string_append_printf(l_str_signs, "%s%s", + dap_enc_get_type_name(l_w_internal->certs[i]->enc_key->type), + ((i + 1) == l_w_internal->certs_count) ? "" : ", "); + } + l_jobj_sings = json_object_new_string(l_str_signs->str); + dap_string_free(l_str_signs, true); + } + json_object_object_add(json_obj_wall, "signs", l_jobj_sings); + } if(l_l_addr_tokens_size <= 0) json_object_object_add(json_obj_wall, "balance", json_object_new_string("0")); json_object * j_arr_balance= json_object_new_array(); @@ -2110,7 +2127,7 @@ int l_arg_index = 1, l_rc, cmd_num = CMD_NONE; "sig_multi_chained. You must specify at least two more " "signatures other than sig_multi_chained.\n" "After sig_multi_chained, you must specify two more signatures " - "from the list: %s", dap_cert_get_str_recommended_sign()); + "from the list:\n%s", dap_cert_get_str_recommended_sign()); json_object_put(json_arr_out); return DAP_CHAIN_NODE_CLI_COM_TX_WALLET_UNKNOWN_SIGN_ERR; }