Skip to content

Commit

Permalink
Review comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Dinonard committed Jun 24, 2024
1 parent 43a36f3 commit 5934958
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions pallets/dapp-staking-v3/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1619,17 +1619,10 @@ pub mod pallet {
Ledger::<T>::insert(&account, ledger);

// 2. Execute the unlock call, clearing all of the unlocking chunks.
let result = Self::internal_claim_unlocked(account);
Self::internal_claim_unlocked(account)?;

// 3. Adjust consumed weight to consume the max possible weight (as defined in the weight macro).
match result {
Ok(mut info) => {
info.pays_fee = Pays::No;
info.actual_weight = None;
}
Err(mut info) => info.post_info.actual_weight = None,
}
result
// 3. In case of success, ensure no fee is paid.
Ok(Pays::No.into())
} else {
// The above logic is designed for a specific scenario and cannot be used otherwise.
Err(Error::<T>::AccountNotInconsistent.into())
Expand Down

0 comments on commit 5934958

Please sign in to comment.