Skip to content

Commit

Permalink
cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
salman01zp committed Dec 11, 2023
1 parent 47ba3b0 commit f741da5
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions pallets/roles/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,10 @@ pub mod pallet {
let staking_ledger =
pallet_staking::Ledger::<T>::get(&stash_account).ok_or(Error::<T>::NotValidator)?;
let max_re_staking_bond = Self::calculate_max_restake_amount(staking_ledger.active);
ensure!(total_profile_restake <= max_re_staking_bond, Error::<T>::ExceedsMaxReStakeValue);
ensure!(
total_profile_restake <= max_re_staking_bond,
Error::<T>::ExceedsMaxReStakeValue
);

// Validate role staking records.
let records = profile.get_records();
Expand Down Expand Up @@ -344,7 +347,10 @@ pub mod pallet {

let max_re_staking_bond = Self::calculate_max_restake_amount(staking_ledger.active);
// Total re_staking amount should not exceed max_re_staking_amount.
ensure!(total_profile_restake <= max_re_staking_bond, Error::<T>::ExceedsMaxReStakeValue);
ensure!(
total_profile_restake <= max_re_staking_bond,
Error::<T>::ExceedsMaxReStakeValue
);

Self::validate_updated_profile(stash_account.clone(), updated_profile.clone())?;
ledger.profile = updated_profile.clone();
Expand Down

0 comments on commit f741da5

Please sign in to comment.