diff --git a/frame/nomination-pools/src/lib.rs b/frame/nomination-pools/src/lib.rs index 8f7acd80106f6..73f76bbf25a8c 100644 --- a/frame/nomination-pools/src/lib.rs +++ b/frame/nomination-pools/src/lib.rs @@ -634,8 +634,8 @@ impl BondedPool { /// Check that the pool can accept a member with `new_funds`. fn ok_to_join(&self) -> Result<(), DispatchError> { - self.ok_to_be_open()?; ensure!(self.state == PoolState::Open, Error::::NotOpen); + self.ok_to_be_open()?; Ok(()) } diff --git a/frame/nomination-pools/src/tests.rs b/frame/nomination-pools/src/tests.rs index 5c2697c4b41e6..fdc7925f291c2 100644 --- a/frame/nomination-pools/src/tests.rs +++ b/frame/nomination-pools/src/tests.rs @@ -459,7 +459,7 @@ mod join { // Balance is gt 1/10 of Balance::MAX assert_noop!(Pools::join(Origin::signed(11), 5, 123), Error::::OverflowRisk); - StakingMock::set_bonded_balance(123, 100); + StakingMock::set_bonded_balance(PRIMARY_ACCOUNT, 10); // Cannot join a pool that isn't open unsafe_set_state(&PRIMARY_ACCOUNT, PoolState::Blocked).unwrap(); assert_noop!(