Merge pull request #164 from peerplays-network/jira-163-fix
163-fix, Return only non-zero vesting balances
This commit is contained in:
commit
3f6b7abadb
1 changed files with 2 additions and 1 deletions
|
|
@ -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);
|
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,
|
std::for_each(vesting_range.first, vesting_range.second,
|
||||||
[&result](const vesting_balance_object& balance) {
|
[&result](const vesting_balance_object& balance) {
|
||||||
result.emplace_back(balance);
|
if(balance.balance.amount > 0)
|
||||||
|
result.emplace_back(balance);
|
||||||
});
|
});
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue