Skip to content
Snippets Groups Projects
Unverified Commit 767af862 authored by Liam Aharon's avatar Liam Aharon
Browse files

address comment

parent 2ec60393
No related merge requests found
Pipeline #465056 canceled with stages
in 5 minutes and 31 seconds
......@@ -551,11 +551,12 @@ pub mod pallet {
Error::<T>::ExpiryBlockMustBeInTheFuture
);
// Always start by updating the pool rewards.
let pool_info = Pools::<T>::get(pool_id).ok_or(Error::<T>::NonExistentPool)?;
ensure!(pool_info.admin == caller, BadOrigin);
// Always start by updating the pool rewards.
let mut pool_info = Self::update_pool_rewards(pool_info)?;
ensure!(pool_info.admin == caller, BadOrigin);
pool_info.expiry_block = new_expiry_block;
Pools::<T>::insert(pool_id, pool_info);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment