Skip to content

Commit

Permalink
Fix typos
Browse files Browse the repository at this point in the history
Signed-off-by: linning <[email protected]>
  • Loading branch information
NingLin-P committed Sep 12, 2024
1 parent 338cf7b commit ddbeb94
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions crates/pallet-domains/src/staking_epoch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -405,14 +405,14 @@ pub(crate) fn do_slash_operator<T: Config>(
// current staked amount
let nominator_staked_amount = share_price.shares_to_stake::<T>(nominator_shares);

let pedning_deposit = deposit
let pending_deposit = deposit
.pending
.map(|pending_deposit| pending_deposit.amount)
.unwrap_or_default();

// do not slash the deposit that is not staked yet
let amount_to_slash_in_holding = locked_amount
.checked_sub(&pedning_deposit)
.checked_sub(&pending_deposit)
.ok_or(TransitionError::BalanceUnderflow)?;

T::Currency::transfer_on_hold(
Expand All @@ -430,7 +430,7 @@ pub(crate) fn do_slash_operator<T: Config>(
T::Currency::release(
&staked_hold_id,
&nominator_id,
pedning_deposit,
pending_deposit,
Precision::BestEffort,
)
.map_err(|_| TransitionError::RemoveLock)?;
Expand Down
2 changes: 1 addition & 1 deletion domains/primitives/messenger/src/messages.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ pub struct Channel<Balance, AccountId> {
/// Owner of the channel
/// Owner maybe None if the channel was initiated on the other chain.
pub maybe_owner: Option<AccountId>,
/// The amount of fund hold on the owner account for this channel
/// The amount of funds put on hold by the owner account for this channel
pub channel_reserve_fee: Balance,
}

Expand Down

0 comments on commit ddbeb94

Please sign in to comment.