From d63a89febf8763c29cf63a43d56f3a077bb06dfd Mon Sep 17 00:00:00 2001 From: Roman Olearski Date: Mon, 4 Sep 2017 08:44:29 +0200 Subject: [PATCH] get_matched_bets_for_bettor: added to the wallet, fixed missing reflection --- betting2-nhl | 3 ++- .../plugins/bookie/include/graphene/bookie/bookie_api.hpp | 1 + libraries/wallet/include/graphene/wallet/wallet.hpp | 3 +++ libraries/wallet/wallet.cpp | 5 +++++ 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/betting2-nhl b/betting2-nhl index 6ec03f1f..b17ccef7 100644 --- a/betting2-nhl +++ b/betting2-nhl @@ -76,7 +76,7 @@ propose_create_sport nathan "2017-05-16-T07:47:01" [["en","spce balls"], ["pl #approve_proposal nathan 1.10.0 { "active_approvals_to_add" : [ "init0", "init1","init2", "init3", "init4", "init5", "init6", "init7", "init8", "init9", "init10"] } 1 approve_proposal nathan 1.10.0 { "active_approvals_to_add" : [ "init0", "init1"] } 1 -approve_proposal nathan 1.10.1 { "active_approvals_to_add" : [ "init0", "init1"] } 1 +approve_proposal nathan 1.10.12 { "active_approvals_to_add" : [ "init0", "init1"] } 1 #get_object 1.16.0 #get_object 1.16.1 @@ -148,6 +148,7 @@ place_bet alice "1.21.0" 1 "123" "PPY" 200 true place_bet carol "1.21.1" 0 "123" "PPY" 200 true cancel_bet carol 1.22.2 1 +get_unmatched_bets_for_bettor 1.21.1 1.2.22 # RESOLVE diff --git a/libraries/plugins/bookie/include/graphene/bookie/bookie_api.hpp b/libraries/plugins/bookie/include/graphene/bookie/bookie_api.hpp index 5039a216..b22059da 100644 --- a/libraries/plugins/bookie/include/graphene/bookie/bookie_api.hpp +++ b/libraries/plugins/bookie/include/graphene/bookie/bookie_api.hpp @@ -82,5 +82,6 @@ FC_API(graphene::bookie::bookie_api, (get_total_matched_bet_amount_for_betting_market_group) (get_events_containing_sub_string) (get_objects) + (get_matched_bets_for_bettor) ) diff --git a/libraries/wallet/include/graphene/wallet/wallet.hpp b/libraries/wallet/include/graphene/wallet/wallet.hpp index 945127f1..126cb47c 100644 --- a/libraries/wallet/include/graphene/wallet/wallet.hpp +++ b/libraries/wallet/include/graphene/wallet/wallet.hpp @@ -1580,6 +1580,8 @@ class wallet_api */ binned_order_book get_binned_order_book(graphene::chain::betting_market_id_type betting_market_id, int32_t precision); + std::vector get_matched_bets_for_bettor(account_id_type bettor_id) const; + vector list_sports() const; vector list_event_groups(sport_id_type sport_id) const; vector list_betting_market_groups(event_id_type event_id) const; @@ -2020,4 +2022,5 @@ FC_API( graphene::wallet::wallet_api, (get_total_matched_bet_amount_for_betting_market_group) (get_events_containing_sub_string) (get_binned_order_book) + (get_matched_bets_for_bettor) ) diff --git a/libraries/wallet/wallet.cpp b/libraries/wallet/wallet.cpp index 5cd3d0bb..fdc11e0b 100644 --- a/libraries/wallet/wallet.cpp +++ b/libraries/wallet/wallet.cpp @@ -5727,6 +5727,11 @@ binned_order_book wallet_api::get_binned_order_book(graphene::chain::betting_mar return( my->_remote_bookie->get_binned_order_book(betting_market_id, precision) ); } +std::vector wallet_api::get_matched_bets_for_bettor(account_id_type bettor_id) const +{ + return( my->_remote_bookie->get_matched_bets_for_bettor(bettor_id) ); +} + // default ctor necessary for FC_REFLECT signed_block_with_info::signed_block_with_info( const signed_block& block ) : signed_block( block )