Skip to content

Commit

Permalink
163-fix, Return only non-zero vesting balances
Browse files Browse the repository at this point in the history
  • Loading branch information
pbattu123 committed Oct 4, 2019
1 parent f1eb625 commit c73d0a3
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 c73d0a3

Please sign in to comment.