pub fn query_withdrawable_unbonded(
    deps: Deps,
    address: String,
) -> VaultResult<WithdrawableUnbondedResponse> {
    let address = deps.api.addr_validate(&address)?;
    let unbond_handler = UNBOND_HANDLERS_ASSIGNED
        .may_load(deps.storage, address)?
        .ok_or(LunaVaultError::NoUnbondHandlerAssigned {})?;

    let state = STATE.load(deps.storage)?;
    let bluna_hub_address =
        query_contract_from_mem(deps, &state.memory_address, ANCHOR_BLUNA_HUB_ID)?;

    // query how much withdrawable_unbonded is on anchor for the given unbond handler
    Ok(white_whale::query::anchor::query_withdrawable_unbonded(
        deps,
        bluna_hub_address,
        unbond_handler,
    )?)
}
/// Queries withdrawable unbonded amount for the unbond handler associated with the given address
Queries withdrawable unbonded amount for the unbond handler associated with the given address
Queries withdrawable unbonded amount for the unbond handler associated with the given address
pub fn query_withdrawable_unbonded(
    deps: Deps,
    address: String,
) -> VaultResult<WithdrawableUnbondedResponse> {
    let address = deps.api.addr_validate(&address)?;
    let unbond_handler = UNBOND_HANDLERS_ASSIGNED
        .may_load(deps.storage, address)?
        .ok_or(LunaVaultError::NoUnbondHandlerAssigned {})?;
    let state = STATE.load(deps.storage)?;
    let bluna_hub_address =
        query_contract_from_mem(deps, &state.memory_address, ANCHOR_BLUNA_HUB_ID)?;
    // query how much withdrawable_unbonded is on anchor for the given unbond handler
    Ok(white_whale::query::anchor::query_withdrawable_unbonded(
        deps,
        bluna_hub_address,
        unbond_handler,
    )?)
}
pub fn query_withdrawable_unbonded ( deps : Deps , address : String , ) -> VaultResult < WithdrawableUnbondedResponse > { let address = deps . api . addr_validate ( & address ) ? ; let unbond_handler = UNBOND_HANDLERS_ASSIGNED . may_load ( deps . storage , address ) ? . ok_or ( LunaVaultError :: NoUnbondHandlerAssigned { } ) ? ; let state = STATE . load ( deps . storage ) ? ; let bluna_hub_address = query_contract_from_mem ( deps , & state . memory_address , ANCHOR_BLUNA_HUB_ID ) ? ; // query how much withdrawable_unbonded is on anchor for the given unbond handler Ok ( white_whale :: query :: anchor :: query_withdrawable_unbonded ( deps , bluna_hub_address , unbond_handler , ) ? ) }
Queries withdrawable unbonded amount for the unbond handler associated with the given address
Queries withdrawable unbonded amount for the unbond handler associated with the given address
deps
Deps
address
String
deps
Deps
address
String