mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 13:31:10 +00:00
Add more asserts and debug_asserts (#8541)
* Add more asserts and debug_asserts fixing #8106 * Remove assignments * convert debug_assert to runtime assert
This commit is contained in:
committed by
GitHub
parent
a600e278ed
commit
e932c3ecd2
@@ -621,7 +621,8 @@ decl_module! {
|
||||
let active_recovery = <ActiveRecoveries<T>>::take(&who, &rescuer).ok_or(Error::<T>::NotStarted)?;
|
||||
// Move the reserved funds from the rescuer to the rescued account.
|
||||
// Acts like a slashing mechanism for those who try to maliciously recover accounts.
|
||||
let _ = T::Currency::repatriate_reserved(&rescuer, &who, active_recovery.deposit, BalanceStatus::Free);
|
||||
let res = T::Currency::repatriate_reserved(&rescuer, &who, active_recovery.deposit, BalanceStatus::Free);
|
||||
debug_assert!(res.is_ok());
|
||||
Self::deposit_event(RawEvent::RecoveryClosed(who, rescuer));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user