fixing bet_cancel_operation, added mising fee to reflection
This commit is contained in:
parent
ec08259b7d
commit
2cd816ec6d
5 changed files with 59 additions and 4 deletions
|
|
@ -142,7 +142,11 @@ approve_proposal nathan 1.10.11 { "active_approvals_to_add" : [ "init0", "init
|
|||
//place_bet alice "1.21.0" 0 { "amount" : 100 } 20000 20000 true
|
||||
|
||||
place_bet alice "1.21.0" 1 "123" "PPY" 200 true
|
||||
place_bet bob "1.21.1" 0 "123" "PPY" 200 true
|
||||
//place_bet bob "1.21.0" 0 "123" "PPY" 200 true
|
||||
|
||||
|
||||
place_bet carol "1.21.1" 0 "123" "PPY" 200 true
|
||||
cancel_bet carol 1.22.2 1
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
40
genesis.json
40
genesis.json
|
|
@ -251,6 +251,46 @@
|
|||
}
|
||||
],[
|
||||
59,{}
|
||||
],[
|
||||
60,{}
|
||||
],[
|
||||
61,{
|
||||
"fee": 100000
|
||||
}
|
||||
],[
|
||||
62,{}
|
||||
],[
|
||||
63,{
|
||||
"fee": 100000
|
||||
}
|
||||
],[
|
||||
64,{}
|
||||
],[
|
||||
65,{
|
||||
"fee": 100000
|
||||
}
|
||||
],[
|
||||
66,{
|
||||
"fee": 100000
|
||||
}
|
||||
],[
|
||||
67,{
|
||||
"fee": 100000
|
||||
}
|
||||
],[
|
||||
68,{}
|
||||
],[
|
||||
69,{
|
||||
"fee": 100000
|
||||
}
|
||||
],[
|
||||
70,{
|
||||
"fee": 100000
|
||||
}
|
||||
],[
|
||||
71,{
|
||||
"fee": 100000
|
||||
}
|
||||
]
|
||||
],
|
||||
"scale": 10000
|
||||
|
|
|
|||
|
|
@ -299,7 +299,11 @@ struct bet_matched_operation : public base_operation
|
|||
|
||||
struct bet_cancel_operation : public base_operation
|
||||
{
|
||||
struct fee_parameters_type { uint64_t fee = GRAPHENE_BLOCKCHAIN_PRECISION; };
|
||||
struct fee_parameters_type
|
||||
{
|
||||
uint64_t fee = GRAPHENE_BLOCKCHAIN_PRECISION;
|
||||
//uint64_t fee = 0;
|
||||
};
|
||||
asset fee;
|
||||
|
||||
/// the bettor who is cancelling the bet
|
||||
|
|
@ -419,7 +423,7 @@ FC_REFLECT( graphene::chain::bet_matched_operation::fee_parameters_type, )
|
|||
FC_REFLECT( graphene::chain::bet_matched_operation, (bettor_id)(bet_id)(amount_bet)(backer_multiplier)(guaranteed_winnings_returned) )
|
||||
|
||||
FC_REFLECT( graphene::chain::bet_cancel_operation::fee_parameters_type, (fee) )
|
||||
FC_REFLECT( graphene::chain::bet_cancel_operation, (bettor_id) (bet_to_cancel) (extensions) )
|
||||
FC_REFLECT( graphene::chain::bet_cancel_operation, (fee) (bettor_id) (bet_to_cancel) (extensions) )
|
||||
|
||||
FC_REFLECT( graphene::chain::bet_canceled_operation::fee_parameters_type, )
|
||||
FC_REFLECT( graphene::chain::bet_canceled_operation, (bettor_id)(bet_id)(stake_returned) )
|
||||
|
|
|
|||
|
|
@ -1587,7 +1587,7 @@ class wallet_api
|
|||
global_betting_statistics_object get_global_betting_statistics() const;
|
||||
vector<event_object> list_events_in_group(event_group_id_type event_group_id) const;
|
||||
vector<bet_object> get_unmatched_bets_for_bettor(betting_market_id_type betting_market_id, account_id_type account_id) const;
|
||||
|
||||
vector<bet_object> get_all_unmatched_bets_for_bettor(account_id_type account_id) const;
|
||||
|
||||
signed_transaction propose_create_sport(
|
||||
const string& proposing_account,
|
||||
|
|
@ -1991,6 +1991,7 @@ FC_API( graphene::wallet::wallet_api,
|
|||
(list_betting_markets)
|
||||
(list_events_in_group)
|
||||
(get_unmatched_bets_for_bettor)
|
||||
(get_all_unmatched_bets_for_bettor)
|
||||
(get_global_betting_statistics)
|
||||
(propose_create_sport)
|
||||
(propose_create_event_group)
|
||||
|
|
|
|||
|
|
@ -5071,11 +5071,17 @@ vector<event_object> wallet_api::list_events_in_group(event_group
|
|||
{
|
||||
return my->_remote_db->list_events_in_group(event_group_id);
|
||||
}
|
||||
|
||||
vector<bet_object> wallet_api::get_unmatched_bets_for_bettor(betting_market_id_type betting_market_id, account_id_type account_id) const
|
||||
{
|
||||
return my->_remote_db->get_unmatched_bets_for_bettor(betting_market_id, account_id);
|
||||
}
|
||||
|
||||
vector<bet_object> wallet_api::get_all_unmatched_bets_for_bettor(account_id_type account_id) const
|
||||
{
|
||||
return my->_remote_db->get_all_unmatched_bets_for_bettor(account_id);
|
||||
}
|
||||
|
||||
signed_transaction wallet_api::propose_create_sport(
|
||||
const string& proposing_account,
|
||||
fc::time_point_sec expiration_time,
|
||||
|
|
|
|||
Loading…
Reference in a new issue