Skip to content

Commit

Permalink
Merge pull request #164 from peerplays-network/jira-163-fix
Browse files Browse the repository at this point in the history
163-fix, Return only non-zero vesting balances
  • Loading branch information
pbattu123 committed Oct 6, 2019
2 parents f1eb625 + c73d0a3 commit 3f6b7ab
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libraries/app/database_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -935,7 +935,8 @@ vector<vesting_balance_object> database_api_impl::get_vesting_balances( account_
auto vesting_range = _db.get_index_type<vesting_balance_index>().indices().get<by_account>().equal_range(account_id);
std::for_each(vesting_range.first, vesting_range.second,
[&result](const vesting_balance_object& balance) {
result.emplace_back(balance);
if(balance.balance.amount > 0)
result.emplace_back(balance);
});
return result;
}
Expand Down

0 comments on commit 3f6b7ab

Please sign in to comment.