pub fn store_unbond_wait_list(
    storage: &mut dyn Storage,
    batch_id: u64,
    sender_address: String,
    amount: Uint128,
) -> StdResult<()> {
    let batch = to_vec(&batch_id)?;
    let addr = to_vec(&sender_address)?;
    let mut position_indexer: Bucket<Uint128> =
        Bucket::multilevel(storage, &[PREFIX_WAIT_MAP, &addr]);
    position_indexer.update(&batch, |asked_already| -> StdResult<Uint128> {
        Ok(asked_already.unwrap_or_default() + amount)
    })?;

    Ok(())
}
/// Store undelegation wait list per each batch
/// HashMap<user's address, <batch_id, requested_amount>
Store undelegation wait list per each batch
HashMap
Store undelegation wait list per each batch HashMap
pub fn store_unbond_wait_list(
    storage: &mut dyn Storage,
    batch_id: u64,
    sender_address: String,
    amount: Uint128,
) -> StdResult<()> {
    let batch = to_vec(&batch_id)?;
    let addr = to_vec(&sender_address)?;
    let mut position_indexer: Bucket<Uint128> =
        Bucket::multilevel(storage, &[PREFIX_WAIT_MAP, &addr]);
    position_indexer.update(&batch, |asked_already| -> StdResult<Uint128> {
        Ok(asked_already.unwrap_or_default() + amount)
    })?;
    Ok(())
}
pub fn store_unbond_wait_list ( storage : & mut dyn Storage , batch_id : u64 , sender_address : String , amount : Uint128 , ) -> StdResult < ( ) > { let batch = to_vec ( & batch_id ) ? ; let addr = to_vec ( & sender_address ) ? ; let mut position_indexer : Bucket < Uint128 > = Bucket :: multilevel ( storage , & [ PREFIX_WAIT_MAP , & addr ] ) ; position_indexer . update ( & batch , | asked_already | -> StdResult < Uint128 > { Ok ( asked_already . unwrap_or_default ( ) + amount ) } ) ? ; Ok ( ( ) ) }
Store undelegation wait list per each batch
HashMap<user's address, <batch_id, requested_amount>
Store undelegation wait list per each batch HashMap<user ' s address <batch_id requested_amount >
storage
&mut dyn Storage
batch_id
u64
sender_address
String
amount
Uint128
storage
&mut dyn Storage
batch_id
u64
sender_address
String
amount
Uint128