fn do_transfer(
		who: &T::AccountId,
		receiver: &T::AccountId,
		wrapped_id: CurrencyId,
		transfer_amount: Balance,
	) -> DispatchResult {
		ensure!(transfer_amount > Balance::zero(), Error::<T>::ZeroBalanceTransaction);
		ensure!(who != receiver, Error::<T>::CannotTransferToSelf);

		// Fail if invalid token id
		let underlying_asset = wrapped_id
			.underlying_asset()
			.ok_or(Error::<T>::NotValidWrappedTokenId)?;
		ensure!(
			T::ManagerLiquidityPools::pool_exists(&underlying_asset),
			liquidity_pools::Error::<T>::PoolNotFound
		);

		// Fail if transfer is not allowed
		ensure!(
			T::ControllerManager::is_operation_allowed(underlying_asset, Operation::Transfer),
			Error::<T>::OperationPaused
		);

		// Fail if transfer_amount is not available for redeem
		T::ControllerManager::redeem_allowed(underlying_asset, &who, transfer_amount)?;

		T::MntManager::update_mnt_supply_index(underlying_asset)?;
		T::MntManager::distribute_supplier_mnt(underlying_asset, who, false)?;
		T::MntManager::distribute_supplier_mnt(underlying_asset, receiver, false)?;

		// Fail if not enough free balance
		ensure!(
			transfer_amount <= T::MultiCurrency::free_balance(wrapped_id, &who),
			Error::<T>::NotEnoughWrappedTokens
		);

		// Transfer the transfer_amount from one account to another
		T::MultiCurrency::transfer(wrapped_id, &who, &receiver, transfer_amount)?;

		Ok(())
	}
/// Sender transfers their tokens to other account
///
/// - `who`: the account transferring tokens.
/// - `receiver`: the account that will receive tokens.
/// - `wrapped_id`: the currency ID of the wrapped asset to transfer.
/// - `transfer_amount`: the amount of the wrapped asset to transfer.
Sender transfers their tokens to other account
`who`: the account transferring tokens.
`receiver`: the account that will receive tokens.
`wrapped_id`: the currency ID of the wrapped asset to transfer.
`transfer_amount`: the amount of the wrapped asset to transfer.
Sender transfers their tokens to other account ` who ` : the account transferring tokens . ` receiver ` : the account that will receive tokens . ` wrapped_id ` : the currency ID of the wrapped asset to transfer . ` transfer_amount ` : the amount of the wrapped asset to transfer .
fn do_transfer(
		who: &T::AccountId,
		receiver: &T::AccountId,
		wrapped_id: CurrencyId,
		transfer_amount: Balance,
	) -> DispatchResult {
		ensure!(transfer_amount > Balance::zero(), Error::<T>::ZeroBalanceTransaction);
		ensure!(who != receiver, Error::<T>::CannotTransferToSelf);
		// Fail if invalid token id
		let underlying_asset = wrapped_id
			.underlying_asset()
			.ok_or(Error::<T>::NotValidWrappedTokenId)?;
		ensure!(
			T::ManagerLiquidityPools::pool_exists(&underlying_asset),
			liquidity_pools::Error::<T>::PoolNotFound
		);
		// Fail if transfer is not allowed
		ensure!(
			T::ControllerManager::is_operation_allowed(underlying_asset, Operation::Transfer),
			Error::<T>::OperationPaused
		);
		// Fail if transfer_amount is not available for redeem
		T::ControllerManager::redeem_allowed(underlying_asset, &who, transfer_amount)?;
		T::MntManager::update_mnt_supply_index(underlying_asset)?;
		T::MntManager::distribute_supplier_mnt(underlying_asset, who, false)?;
		T::MntManager::distribute_supplier_mnt(underlying_asset, receiver, false)?;
		// Fail if not enough free balance
		ensure!(
			transfer_amount <= T::MultiCurrency::free_balance(wrapped_id, &who),
			Error::<T>::NotEnoughWrappedTokens
		);
		// Transfer the transfer_amount from one account to another
		T::MultiCurrency::transfer(wrapped_id, &who, &receiver, transfer_amount)?;
		Ok(())
	}
fn do_transfer ( who : & T :: AccountId , receiver : & T :: AccountId , wrapped_id : CurrencyId , transfer_amount : Balance , ) -> DispatchResult { ensure ! ( transfer_amount Balance zero ( ) Error T ZeroBalanceTransaction ) ; ensure ! ( who receiver Error T CannotTransferToSelf ) ; // Fail if invalid token id let underlying_asset = wrapped_id . underlying_asset ( ) . ok_or ( Error :: < T > :: NotValidWrappedTokenId ) ? ; ensure ! ( T ManagerLiquidityPools pool_exists ( underlying_asset ) liquidity_pools Error T PoolNotFound ) ; // Fail if transfer is not allowed ensure ! ( T ControllerManager is_operation_allowed ( underlying_asset Operation Transfer ) Error T OperationPaused ) ; // Fail if transfer_amount is not available for redeem T :: ControllerManager :: redeem_allowed ( underlying_asset , & who , transfer_amount ) ? ; T :: MntManager :: update_mnt_supply_index ( underlying_asset ) ? ; T :: MntManager :: distribute_supplier_mnt ( underlying_asset , who , false ) ? ; T :: MntManager :: distribute_supplier_mnt ( underlying_asset , receiver , false ) ? ; // Fail if not enough free balance ensure ! ( transfer_amount T MultiCurrency free_balance ( wrapped_id who ) Error T NotEnoughWrappedTokens ) ; // Transfer the transfer_amount from one account to another T :: MultiCurrency :: transfer ( wrapped_id , & who , & receiver , transfer_amount ) ? ; Ok ( ( ) ) }
Sender transfers their tokens to other account
 `who`: the account transferring tokens.
Sender transfers their tokens to other account ` who ` : the account transferring tokens .
who
&T::AccountId
receiver
&T::AccountId
wrapped_id
CurrencyId
transfer_amount
Balance
who
&T::AccountId
receiver
&T::AccountId
wrapped_id
CurrencyId
transfer_amount
Balance