Merge pull request #232 from oxarbitrage/issue230
Added withdraw permissions to get_full_account api function. requeste…
This commit is contained in:
commit
73deff6a56
2 changed files with 11 additions and 1 deletions
|
|
@ -608,6 +608,13 @@ std::map<std::string, full_account> database_api_impl::get_full_accounts( const
|
||||||
acnt.assets.emplace_back(asset.id);
|
acnt.assets.emplace_back(asset.id);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// get withdraws permissions
|
||||||
|
auto withdraw_range = _db.get_index_type<withdraw_permission_index>().indices().get<by_from>().equal_range(account->id);
|
||||||
|
std::for_each(withdraw_range.first, withdraw_range.second,
|
||||||
|
[&acnt] (const withdraw_permission_object& withdraw) {
|
||||||
|
acnt.withdraws.emplace_back(withdraw);
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
results[account_name_or_id] = acnt;
|
results[account_name_or_id] = acnt;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,7 @@
|
||||||
#include <graphene/chain/account_object.hpp>
|
#include <graphene/chain/account_object.hpp>
|
||||||
#include <graphene/chain/vesting_balance_object.hpp>
|
#include <graphene/chain/vesting_balance_object.hpp>
|
||||||
#include <graphene/chain/market_evaluator.hpp>
|
#include <graphene/chain/market_evaluator.hpp>
|
||||||
|
#include <graphene/chain/withdraw_permission_object.hpp>
|
||||||
|
|
||||||
namespace graphene { namespace app {
|
namespace graphene { namespace app {
|
||||||
using namespace graphene::chain;
|
using namespace graphene::chain;
|
||||||
|
|
@ -45,6 +46,7 @@ namespace graphene { namespace app {
|
||||||
vector<call_order_object> call_orders;
|
vector<call_order_object> call_orders;
|
||||||
vector<proposal_object> proposals;
|
vector<proposal_object> proposals;
|
||||||
vector<asset_id_type> assets;
|
vector<asset_id_type> assets;
|
||||||
|
vector<withdraw_permission_object> withdraws;
|
||||||
};
|
};
|
||||||
|
|
||||||
} }
|
} }
|
||||||
|
|
@ -63,4 +65,5 @@ FC_REFLECT( graphene::app::full_account,
|
||||||
(call_orders)
|
(call_orders)
|
||||||
(proposals)
|
(proposals)
|
||||||
(assets)
|
(assets)
|
||||||
|
(withdraws)
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue