Skip to content
Snippets Groups Projects
Commit c6b1468e authored by alexey.stratulat's avatar alexey.stratulat
Browse files

[+] Added input item TX_ITEM_TYPE_VOTE AND TX_ITEM_TYPE_VOTING for function...

[+] Added input item TX_ITEM_TYPE_VOTE AND TX_ITEM_TYPE_VOTING for function dap_chain_datum_tx_to_json.
parent 26508e8b
No related branches found
No related tags found
1 merge request!1486[+] Added input item TX_ITEM_TYPE_VOTE AND TX_ITEM_TYPE_VOTING for function...
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#include "dap_json_rpc_chain_datum_tx_items.h" #include "dap_json_rpc_chain_datum_tx_items.h"
#include "dap_json_rpc_chain_datum_tx_receipt.h" #include "dap_json_rpc_chain_datum_tx_receipt.h"
#include "json.h" #include "json.h"
#include "dap_chain_datum_tx_voting.h"
#define LOG_TAG "dap_json_rpc_chain_datum_tx" #define LOG_TAG "dap_json_rpc_chain_datum_tx"
...@@ -107,6 +108,14 @@ json_object *dap_chain_datum_tx_to_json(dap_chain_datum_tx_t *a_tx){ ...@@ -107,6 +108,14 @@ json_object *dap_chain_datum_tx_to_json(dap_chain_datum_tx_t *a_tx){
l_obj_item_type = json_object_new_string("TX_ITEM_TYPE_TSD"); l_obj_item_type = json_object_new_string("TX_ITEM_TYPE_TSD");
l_obj_item_data = dap_chain_datum_tx_item_tsd_to_json((dap_chain_tx_tsd_t*)item); l_obj_item_data = dap_chain_datum_tx_item_tsd_to_json((dap_chain_tx_tsd_t*)item);
break; break;
case TX_ITEM_TYPE_VOTE:
l_obj_item_type = json_object_new_string("TX_ITEM_TYPE_VOTE");
l_obj_item_data = dap_chain_datum_tx_item_vote_to_json((dap_chain_tx_vote_t*)item);
break;
case TX_ITEM_TYPE_VOTING:
l_obj_item_type = json_object_new_string("TX_ITEM_TYPE_VOTING");
l_obj_item_data = dap_chain_datum_tx_item_voting_tsd_to_json(a_tx);
break;
default: { default: {
char *l_hash_str; char *l_hash_str;
dap_get_data_hash_str_static(a_tx, dap_chain_datum_tx_get_size(a_tx), l_hash_str); dap_get_data_hash_str_static(a_tx, dap_chain_datum_tx_get_size(a_tx), l_hash_str);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment