Skip to content

Commit

Permalink
fix premature unlock with bond_extra (#267)
Browse files Browse the repository at this point in the history
  • Loading branch information
brenzi authored Aug 27, 2024
1 parent d9223be commit 4ff695c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions teerdays/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ pub mod pallet {
#[pallet::compact] value: BalanceOf<T>,
) -> DispatchResult {
let signer = ensure_signed(origin)?;
ensure!(Self::pending_unlock(&signer).is_none(), Error::<T>::PendingUnlock);
ensure!(value >= T::Currency::minimum_balance(), Error::<T>::InsufficientBond);
let bond = Self::do_update_teerdays(&signer)?;
let free_balance = T::Currency::free_balance(&signer);
Expand Down

0 comments on commit 4ff695c

Please sign in to comment.