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

[*] The wrapper of the search function for the ticker token by the hash of the...

[*] The wrapper of the search function for the ticker token by the hash of the transaction in ledger, was commented out for some reason, I fixed it and checked the performance of the wrapper.
parent 1ed8507c
No related branches found
No related tags found
1 merge request!73Features-5386 to develop
This commit is part of merge request !73. Comments created here will be created in the context of that merge request.
......@@ -68,14 +68,15 @@ PyObject *dap_chain_ledger_token_emission_find_py(PyObject *self, PyObject *args
return Py_BuildValue("O", &token_emission);
}
PyObject *dap_chain_ledger_tx_get_token_ticker_by_hash_py(PyObject *self, PyObject *args){
//TODO
//Missing implementation of dap_chain_ledger_tx_get_token_ticker_by_hash function in dap_chain_ledger
return NULL;
// PyObject *obj_tx_hash;
// if (!PyArg_ParseTuple(args, "O", &obj_tx_hash))
// return NULL;
// const char *res = dap_chain_ledger_tx_get_token_ticker_by_hash(((PyDapChainHashFastObject*)obj_tx_hash)->hash_fast);
// return Py_BuildValue("s", res);
PyObject *obj_hash;
if (!PyArg_ParseTuple(args, "O", &obj_hash)){
PyErr_SetString(PyExc_AttributeError, "This function takes one argument, it is an instance of an object of type HashFast.");
return NULL;
}
const char *l_ticker = dap_chain_ledger_tx_get_token_ticker_by_hash(
((PyDapChainLedgerObject*)self)->ledger,
((PyDapHashFastObject*)obj_hash)->hash_fast);
return Py_BuildValue("s", l_ticker);
}
PyObject *dap_chain_ledger_addr_get_token_ticker_all_py(PyObject *self, PyObject *args){
PyObject *obj_addr;
......
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