fn redeem_allowed(underlying_asset: CurrencyId, redeemer: &T::AccountId, redeem_amount: Balance) -> DispatchResult {
		if LiquidityPools::<T>::check_user_available_collateral(&redeemer, underlying_asset) {
			let (_, shortfall) =
				Self::get_hypothetical_account_liquidity(&redeemer, underlying_asset, redeem_amount, 0)
					.map_err(|_| Error::<T>::HypotheticalLiquidityCalculationError)?;

			ensure!(shortfall.is_zero(), Error::<T>::InsufficientLiquidity);
		}
		Ok(())
	}
/// Checks if the account should be allowed to redeem tokens in the given pool.
///
/// - `underlying_asset` - The CurrencyId to verify the redeem against.
/// - `redeemer` -  The account which would redeem the tokens.
/// - `redeem_amount` - The number of mTokens to exchange for the underlying asset in the
/// pool.
///
/// Return Ok if the redeem is allowed.
Checks if the account should be allowed to redeem tokens in the given pool.
`underlying_asset` - The CurrencyId to verify the redeem against.
`redeemer` -  The account which would redeem the tokens.
`redeem_amount` - The number of mTokens to exchange for the underlying asset in the
pool.

Return Ok if the redeem is allowed.
Checks if the account should be allowed to redeem tokens in the given pool . ` underlying_asset ` - The CurrencyId to verify the redeem against . ` redeemer ` - The account which would redeem the tokens . ` redeem_amount ` - The number of mTokens to exchange for the underlying asset in the pool . Return Ok if the redeem is allowed .
fn redeem_allowed(underlying_asset: CurrencyId, redeemer: &T::AccountId, redeem_amount: Balance) -> DispatchResult {
		if LiquidityPools::<T>::check_user_available_collateral(&redeemer, underlying_asset) {
			let (_, shortfall) =
				Self::get_hypothetical_account_liquidity(&redeemer, underlying_asset, redeem_amount, 0)
					.map_err(|_| Error::<T>::HypotheticalLiquidityCalculationError)?;
			ensure!(shortfall.is_zero(), Error::<T>::InsufficientLiquidity);
		}
		Ok(())
	}
fn redeem_allowed ( underlying_asset : CurrencyId , redeemer : & T :: AccountId , redeem_amount : Balance ) -> DispatchResult { if LiquidityPools :: < T > :: check_user_available_collateral ( & redeemer , underlying_asset ) { let ( _ , shortfall ) = Self :: get_hypothetical_account_liquidity ( & redeemer , underlying_asset , redeem_amount , 0 ) . map_err ( | _ | Error :: < T > :: HypotheticalLiquidityCalculationError ) ? ; ensure ! ( shortfall is_zero ( ) Error T InsufficientLiquidity ) ; } Ok ( ( ) ) }
Checks if the account should be allowed to redeem tokens in the given pool.
Checks if the account should be allowed to redeem tokens in the given pool .
underlying_asset
CurrencyId
redeemer
&T::AccountId
redeem_amount
Balance
underlying_asset
CurrencyId
redeemer
&T::AccountId
redeem_amount
Balance