fn resolve_single_intention(intention: &Intention<T>) {
		let amm_transfer = match intention.sell_or_buy {
			IntentionType::SELL => T::AMMPool::validate_sell(
				&intention.who,
				intention.assets,
				intention.amount_in,
				intention.trade_limit,
				intention.discount,
			),
			IntentionType::BUY => T::AMMPool::validate_buy(
				&intention.who,
				intention.assets,
				intention.amount_out,
				intention.trade_limit,
				intention.discount,
			),
		};

		match amm_transfer {
			Ok(x) => match Self::execute_amm_transfer(intention.sell_or_buy, intention.intention_id, &x) {
				Ok(_) => {}
				Err(error) => {
					Self::send_intention_error_event(&intention, error);
				}
			},
			Err(error) => {
				Self::send_intention_error_event(&intention, error);
			}
		};
	}
/// Resolve intention via AMM pool.
Resolve intention via AMM pool.
Resolve intention via AMM pool .
fn resolve_single_intention(intention: &Intention<T>) {
		let amm_transfer = match intention.sell_or_buy {
			IntentionType::SELL => T::AMMPool::validate_sell(
				&intention.who,
				intention.assets,
				intention.amount_in,
				intention.trade_limit,
				intention.discount,
			),
			IntentionType::BUY => T::AMMPool::validate_buy(
				&intention.who,
				intention.assets,
				intention.amount_out,
				intention.trade_limit,
				intention.discount,
			),
		};
		match amm_transfer {
			Ok(x) => match Self::execute_amm_transfer(intention.sell_or_buy, intention.intention_id, &x) {
				Ok(_) => {}
				Err(error) => {
					Self::send_intention_error_event(&intention, error);
				}
			},
			Err(error) => {
				Self::send_intention_error_event(&intention, error);
			}
		};
	}
fn resolve_single_intention ( intention : & Intention < T > ) { let amm_transfer = match intention . sell_or_buy { IntentionType :: SELL => T :: AMMPool :: validate_sell ( & intention . who , intention . assets , intention . amount_in , intention . trade_limit , intention . discount , ) , IntentionType :: BUY => T :: AMMPool :: validate_buy ( & intention . who , intention . assets , intention . amount_out , intention . trade_limit , intention . discount , ) , } ; match amm_transfer { Ok ( x ) => match Self :: execute_amm_transfer ( intention . sell_or_buy , intention . intention_id , & x ) { Ok ( _ ) => { } Err ( error ) => { Self :: send_intention_error_event ( & intention , error ) ; } } , Err ( error ) => { Self :: send_intention_error_event ( & intention , error ) ; } } ; }
Resolve intention via AMM pool.
Resolve intention via AMM pool .
intention
&Intention<T>