pub trait CurrencyConversion<Amount, CurrencyId> {
    // Required method
    fn convert(amount: &Amount, to: CurrencyId) -> Result<Amount, DispatchError>;
}

Required Methods§

source

fn convert(amount: &Amount, to: CurrencyId) -> Result<Amount, DispatchError>

Implementors§

source§

impl<T, Oracle, Loans> CurrencyConversion<Amount<T>, <T as Config>::CurrencyId> for CurrencyConvert<T, Oracle, Loans>where T: Config, Oracle: OracleApi<Amount<T>, CurrencyId<T>>, Loans: LoansApi<CurrencyId<T>, T::AccountId, Amount<T>>,