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

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