Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RPC] Fix listconsultations "" #690

Merged
merged 1 commit into from Jun 4, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 6 additions & 7 deletions src/rpc/blockchain.cpp
Expand Up @@ -1039,38 +1039,37 @@ UniValue listconsultations(const UniValue& params, bool fHelp)
bool showReflection = false;
bool showVoting = false;
bool showFinished = false;
bool showAll = params.size() == 0;
bool showAll = true;

if(params.size() >= 1)
{
showNotEnoughAnswers = false;
showLookingForSupport = false;
showReflection = false;
showVoting = false;
showFinished = false;

for(unsigned int i = 0; i < params.size(); i++)
{
auto p = params[i];
if (p.get_str() == "not_enough_answers")
{
showNotEnoughAnswers = true;
showAll = false;
}
else if (p.get_str() == "waiting_for_support")
{
showLookingForSupport = true;
showAll = false;
}
else if (p.get_str() == "reflection")
{
showReflection = true;
showAll = false;
}
else if (p.get_str() == "voting")
{
showVoting = true;
showAll = false;
}
else if (p.get_str() == "finished")
{
showFinished = true;
showAll = false;
}
}
}
Expand Down