pub fn assert_collateral<S: Storage, A: Api, Q: Querier>(
    deps: &Extern<S, A, Q>,
    position: &Position,
    collateral: &Asset,
) -> StdResult<()> {
    if !collateral
        .info
        .equal(&position.collateral.info.to_normal(&deps)?)
        || collateral.amount.is_zero()
    {
        return Err(StdError::generic_err("Wrong collateral"));
    }

    Ok(())
}
// Check zero balance & same collateral with position
Check zero balance & same collateral with position
Check zero balance & same collateral with position
pub fn assert_collateral<S: Storage, A: Api, Q: Querier>(
    deps: &Extern<S, A, Q>,
    position: &Position,
    collateral: &Asset,
) -> StdResult<()> {
    if !collateral
        .info
        .equal(&position.collateral.info.to_normal(&deps)?)
        || collateral.amount.is_zero()
    {
        return Err(StdError::generic_err("Wrong collateral"));
    }
    Ok(())
}
pub fn assert_collateral < S : Storage , A : Api , Q : Querier > ( deps : & Extern < S , A , Q > , position : & Position , collateral : & Asset , ) -> StdResult < ( ) > { if ! collateral . info . equal ( & position . collateral . info . to_normal ( & deps ) ? ) || collateral . amount . is_zero ( ) { return Err ( StdError :: generic_err ( " " ) ) ; } Ok ( ( ) ) }
Check zero balance & same collateral with position
Check zero balance & same collateral with position
deps
&Extern<S, A, Q>
position
&Position
collateral
&Asset