Skip to content

Commit

Permalink
improve multi_withdraw_unbond (#1969)
Browse files Browse the repository at this point in the history
  • Loading branch information
mclyk authored Mar 25, 2024
1 parent 97cce9a commit a5dd383
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pallets/liquid-staking/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1648,8 +1648,10 @@ pub mod pallet {

#[require_transactional]
fn do_multi_withdraw_unbonded(num_slashing_spans: u32) -> DispatchResult {
for derivative_index in StakingLedgers::<T>::iter_keys() {
Self::do_withdraw_unbonded(derivative_index, num_slashing_spans)?;
if XcmRequests::<T>::iter().count().is_zero() {
for derivative_index in StakingLedgers::<T>::iter_keys() {
Self::do_withdraw_unbonded(derivative_index, num_slashing_spans)?;
}
}

Ok(())
Expand Down

0 comments on commit a5dd383

Please sign in to comment.