fn execute_amm_transfer(
		amm_tranfer_type: IntentionType,
		intention_id: IntentionId<T>,
		transfer: &AMMTransfer<T::AccountId, AssetPair, Balance>,
	) -> dispatch::DispatchResult {
		match amm_tranfer_type {
			IntentionType::SELL => {
				T::AMMPool::execute_sell(transfer)?;

				Self::deposit_event(Event::IntentionResolvedAMMTrade(
					transfer.origin.clone(),
					IntentionType::SELL,
					intention_id,
					transfer.amount,
					transfer.amount_out,
				));
			}
			IntentionType::BUY => {
				T::AMMPool::execute_buy(transfer)?;

				Self::deposit_event(Event::IntentionResolvedAMMTrade(
					transfer.origin.clone(),
					IntentionType::BUY,
					intention_id,
					transfer.amount,
					transfer.amount_out,
				));
			}
		};

		Ok(())
	}
/// Execute AMM trade.
///
/// Perform AMM trade with given transfer details.
Execute AMM trade.
Perform AMM trade with given transfer details.
Execute AMM trade . Perform AMM trade with given transfer details .
fn execute_amm_transfer(
		amm_tranfer_type: IntentionType,
		intention_id: IntentionId<T>,
		transfer: &AMMTransfer<T::AccountId, AssetPair, Balance>,
	) -> dispatch::DispatchResult {
		match amm_tranfer_type {
			IntentionType::SELL => {
				T::AMMPool::execute_sell(transfer)?;
				Self::deposit_event(Event::IntentionResolvedAMMTrade(
					transfer.origin.clone(),
					IntentionType::SELL,
					intention_id,
					transfer.amount,
					transfer.amount_out,
				));
			}
			IntentionType::BUY => {
				T::AMMPool::execute_buy(transfer)?;
				Self::deposit_event(Event::IntentionResolvedAMMTrade(
					transfer.origin.clone(),
					IntentionType::BUY,
					intention_id,
					transfer.amount,
					transfer.amount_out,
				));
			}
		};
		Ok(())
	}
fn execute_amm_transfer ( amm_tranfer_type : IntentionType , intention_id : IntentionId < T > , transfer : & AMMTransfer < T :: AccountId , AssetPair , Balance > , ) -> dispatch :: DispatchResult { match amm_tranfer_type { IntentionType :: SELL => { T :: AMMPool :: execute_sell ( transfer ) ? ; Self :: deposit_event ( Event :: IntentionResolvedAMMTrade ( transfer . origin . clone ( ) , IntentionType :: SELL , intention_id , transfer . amount , transfer . amount_out , ) ) ; } IntentionType :: BUY => { T :: AMMPool :: execute_buy ( transfer ) ? ; Self :: deposit_event ( Event :: IntentionResolvedAMMTrade ( transfer . origin . clone ( ) , IntentionType :: BUY , intention_id , transfer . amount , transfer . amount_out , ) ) ; } } ; Ok ( ( ) ) }
Execute AMM trade.
Execute AMM trade .
amm_tranfer_type
IntentionType
intention_id
IntentionId<T>
transfer
&AMMTransfer<T::AccountId, AssetPair, Balance>