Merge pull request #164 from peerplays-network/jira-163-fix

163-fix, Return only non-zero vesting balances
This commit is contained in:
pbattu123 2019-10-06 16:38:52 -03:00 committed by GitHub
commit 3f6b7abadb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;
}