Add missing 'description' field to betting_market_update operation
This commit is contained in:
parent
6e33db129d
commit
3ac447b8a7
6 changed files with 12 additions and 2 deletions
|
|
@ -204,7 +204,7 @@ object_id_type betting_market_create_evaluator::do_apply(const betting_market_cr
|
|||
void_result betting_market_update_evaluator::do_evaluate(const betting_market_update_operation& op)
|
||||
{ try {
|
||||
FC_ASSERT(trx_state->_is_proposed_trx);
|
||||
FC_ASSERT(op.new_group_id.valid() || op.new_payout_condition, "nothing to change");
|
||||
FC_ASSERT(op.new_group_id.valid() || op.new_description.valid() || op.new_payout_condition.valid(), "nothing to change");
|
||||
|
||||
if (op.new_group_id.valid())
|
||||
{
|
||||
|
|
@ -235,6 +235,8 @@ void_result betting_market_update_evaluator::do_apply(const betting_market_updat
|
|||
bmo.group_id = group_id;
|
||||
if( op.new_payout_condition.valid() )
|
||||
bmo.payout_condition = *op.new_payout_condition;
|
||||
if( op.new_description.valid() )
|
||||
bmo.description = *op.new_description;
|
||||
});
|
||||
return void_result();
|
||||
} FC_CAPTURE_AND_RETHROW( (op) ) }
|
||||
|
|
|
|||
|
|
@ -152,6 +152,8 @@ struct betting_market_update_operation : public base_operation
|
|||
|
||||
optional<object_id_type> new_group_id;
|
||||
|
||||
optional<internationalized_string_type> new_description;
|
||||
|
||||
optional<internationalized_string_type> new_payout_condition;
|
||||
|
||||
extensions_type extensions;
|
||||
|
|
@ -385,7 +387,7 @@ FC_REFLECT( graphene::chain::betting_market_create_operation,
|
|||
|
||||
FC_REFLECT( graphene::chain::betting_market_update_operation::fee_parameters_type, (fee) )
|
||||
FC_REFLECT( graphene::chain::betting_market_update_operation,
|
||||
(fee)(betting_market_id)(new_group_id)(new_payout_condition)(extensions) )
|
||||
(fee)(betting_market_id)(new_group_id)(new_description)(new_payout_condition)(extensions) )
|
||||
|
||||
FC_REFLECT_ENUM( graphene::chain::betting_market_resolution_type, (win)(not_win)(cancel)(BETTING_MARKET_RESOLUTION_COUNT) )
|
||||
|
||||
|
|
|
|||
|
|
@ -1669,6 +1669,7 @@ class wallet_api
|
|||
fc::time_point_sec expiration_time,
|
||||
betting_market_id_type market_id,
|
||||
fc::optional<object_id_type> group_id,
|
||||
fc::optional<internationalized_string_type> description,
|
||||
fc::optional<internationalized_string_type> payout_condition,
|
||||
bool broadcast = false);
|
||||
|
||||
|
|
|
|||
|
|
@ -5367,6 +5367,7 @@ signed_transaction wallet_api::propose_update_betting_market(
|
|||
fc::time_point_sec expiration_time,
|
||||
betting_market_id_type market_id,
|
||||
fc::optional<object_id_type> group_id,
|
||||
fc::optional<internationalized_string_type> description,
|
||||
fc::optional<internationalized_string_type> payout_condition,
|
||||
bool broadcast /*= false*/)
|
||||
{
|
||||
|
|
@ -5376,6 +5377,7 @@ signed_transaction wallet_api::propose_update_betting_market(
|
|||
betting_market_update_operation betting_market_update_op;
|
||||
betting_market_update_op.betting_market_id = market_id;
|
||||
betting_market_update_op.new_group_id = group_id;
|
||||
betting_market_update_op.new_description = description;
|
||||
betting_market_update_op.new_payout_condition = payout_condition;
|
||||
|
||||
proposal_create_operation prop_op;
|
||||
|
|
|
|||
|
|
@ -1379,11 +1379,13 @@ const betting_market_object& database_fixture::create_betting_market(betting_mar
|
|||
|
||||
void database_fixture::update_betting_market(betting_market_id_type betting_market_id,
|
||||
fc::optional<object_id_type> group_id,
|
||||
/*fc::optional<internationalized_string_type> description,*/
|
||||
fc::optional<internationalized_string_type> payout_condition)
|
||||
{ try {
|
||||
betting_market_update_operation betting_market_update_op;
|
||||
betting_market_update_op.betting_market_id = betting_market_id;
|
||||
betting_market_update_op.new_group_id = group_id;
|
||||
//betting_market_update_op.new_description = description;
|
||||
betting_market_update_op.new_payout_condition = payout_condition;
|
||||
process_operation_by_witnesses(betting_market_update_op);
|
||||
} FC_CAPTURE_AND_RETHROW( (betting_market_id) (group_id) (payout_condition) ) }
|
||||
|
|
|
|||
|
|
@ -314,6 +314,7 @@ struct database_fixture {
|
|||
const betting_market_object& create_betting_market(betting_market_group_id_type group_id, internationalized_string_type payout_condition);
|
||||
void update_betting_market(betting_market_id_type betting_market_id,
|
||||
fc::optional<object_id_type> group_id,
|
||||
/*fc::optional<internationalized_string_type> description,*/
|
||||
fc::optional<internationalized_string_type> payout_condition);
|
||||
|
||||
void place_bet(account_id_type bettor_id, betting_market_id_type betting_market_id, bet_type back_or_lay, asset amount_to_bet, bet_multiplier_type backer_multiplier, share_type amount_reserved_for_fees);
|
||||
|
|
|
|||
Loading…
Reference in a new issue