Fetch balances + fix gui thread issues

This commit is contained in:
Aditya Kulkarni
2019-10-16 13:12:32 -07:00
parent 28fdac1b72
commit 53cbea1fda
10 changed files with 121 additions and 81 deletions

View File

@@ -47,10 +47,12 @@ void LiteInterface::fetchZAddresses(const std::function<void(json)>& cb) {
// conn->doRPCWithDefaultErrorHandling(payload, cb);
}
void LiteInterface::fetchTransparentUnspent(const std::function<void(json)>& cb) {
void LiteInterface::fetchUnspent(const std::function<void(json)>& cb) {
if (conn == nullptr)
return;
conn->doRPCWithDefaultErrorHandling("notes", "", cb);
// json payload = {
// {"jsonrpc", "1.0"},
// {"id", "someid"},
@@ -61,20 +63,6 @@ void LiteInterface::fetchTransparentUnspent(const std::function<void(json)>& cb)
// conn->doRPCWithDefaultErrorHandling(payload, cb);
}
void LiteInterface::fetchZUnspent(const std::function<void(json)>& cb) {
if (conn == nullptr)
return;
// json payload = {
// {"jsonrpc", "1.0"},
// {"id", "someid"},
// {"method", "z_listunspent"},
// {"params", {0}} // Get UTXOs with 0 confirmations as well.
// };
// conn->doRPCWithDefaultErrorHandling(payload, cb);
}
void LiteInterface::createNewZaddr(bool sapling, const std::function<void(json)>& cb) {
if (conn == nullptr)
return;
@@ -217,7 +205,7 @@ void LiteInterface::sendZTransaction(json params, const std::function<void(json)
}
void LiteInterface::fetchInfo(const std::function<void(json)>& cb,
const std::function<void(QNetworkReply*, const json&)>& err) {
const std::function<void(QString)>& err) {
if (conn == nullptr)
return;