git.delta.rocks / unique-network / refs/commits / d79c091d7b6d

difftreelog

fix stake logic

PraetorP2022-09-07parent: #d83ab4f.patch.diff
in: master

1 file changed

modifiedpallets/app-promotion/src/lib.rsdiffbeforeafterboth
280 &staker_id,280 &staker_id,
281 amount,281 amount,
282 WithdrawReasons::all(),282 WithdrawReasons::all(),
283 balance - amount,283 balance
284 .checked_sub(&amount)
285 .ok_or(ArithmeticError::Underflow)?,
284 )?;286 )?;
285287
286 Self::add_lock_balance(&staker_id, amount)?;288 Self::add_lock_balance(&staker_id, amount)?;