Skip to content

Commit

Permalink
Improve error type
Browse files Browse the repository at this point in the history
  • Loading branch information
emostov committed Mar 16, 2022
1 parent 850cb3e commit f48cd37
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion frame/nomination-pools/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1004,6 +1004,8 @@ pub mod pallet {
AccountBelongsToOtherPool,
/// The pool has insufficient balance to bond as a nominator.
InsufficientBond,
/// The caller does not have enough funds to create pool.
InsufficientFundsToCreate,
/// The delegator is already unbonding.
AlreadyUnbonding,
/// The delegator is not unbonding and thus cannot withdraw funds.
Expand Down Expand Up @@ -1405,7 +1407,7 @@ pub mod pallet {
ensure!(
T::Currency::free_balance(&who) >=
amount.saturating_add(T::Currency::minimum_balance()),
Error::<T>::MinimumBondNotMet
Error::<T>::InsufficientFundsToCreate
);

let pool_id = LastPoolId::<T>::mutate(|id| {
Expand Down

0 comments on commit f48cd37

Please sign in to comment.