Merge pull request #261 from pch957/master

return force settlement order with the get_full_account api
This commit is contained in:
Vikram Rajkumar 2017-04-15 14:06:48 -05:00 committed by GitHub
commit aa6f3e9051
2 changed files with 9 additions and 2 deletions

View file

@ -666,6 +666,11 @@ std::map<std::string, full_account> database_api_impl::get_full_accounts( const
[&acnt] (const call_order_object& call) {
acnt.call_orders.emplace_back(call);
});
auto settle_range = _db.get_index_type<force_settlement_index>().indices().get<by_account>().equal_range(account->id);
std::for_each(settle_range.first, settle_range.second,
[&acnt] (const force_settlement_object& settle) {
acnt.settle_orders.emplace_back(settle);
});
// get assets issued by user
auto asset_range = _db.get_index_type<asset_index>().indices().get<by_issuer>().equal_range(account->id);

View file

@ -44,6 +44,7 @@ namespace graphene { namespace app {
vector<vesting_balance_object> vesting_balances;
vector<limit_order_object> limit_orders;
vector<call_order_object> call_orders;
vector<force_settlement_object> settle_orders;
vector<proposal_object> proposals;
vector<asset_id_type> assets;
vector<withdraw_permission_object> withdraws;
@ -51,7 +52,7 @@ namespace graphene { namespace app {
} }
FC_REFLECT( graphene::app::full_account,
FC_REFLECT( graphene::app::full_account,
(account)
(statistics)
(registrar_name)
@ -63,7 +64,8 @@ FC_REFLECT( graphene::app::full_account,
(vesting_balances)
(limit_orders)
(call_orders)
(proposals)
(settle_orders)
(proposals)
(assets)
(withdraws)
)