Task: The Peerplays DEX should only allow UIA and sidechain assets to be paired (traded) with the core token (PPY).
This commit is contained in:
Roman Olearski 2017-04-06 09:46:17 +02:00
parent 2012fe6e90
commit 66208a2d9e

View file

@ -52,6 +52,11 @@ void_result limit_order_create_evaluator::do_evaluate(const limit_order_create_o
if( _sell_asset->options.blacklist_markets.size() )
FC_ASSERT( _sell_asset->options.blacklist_markets.find(_receive_asset->id) == _sell_asset->options.blacklist_markets.end() );
// I. DEX Task
FC_ASSERT(_receive_asset->id == asset_id_type() || _sell_asset->id == asset_id_type(),
"No asset in the trade is CORE.");
FC_ASSERT( is_authorized_asset( d, *_seller, *_sell_asset ) );
FC_ASSERT( is_authorized_asset( d, *_seller, *_receive_asset ) );