Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(StakeManager): initial MP should not increase when locking
When an account calls `lock()` on the `StakeManager` it ultimately called `_mintInitialMP()` which besides increasing the accounts `currentMP`, it also increases the accounts `initialMP`. This seems incorrect, as `initialMP` should only increase at first stake. Also, notice how inside `lock()` it always passes an `amount` of `0` to to `_mintInitialMP()`, so it only ever uses one code path of that function. This commit adjust `lock()` such that it no longer uses `_mintInitialMP()` and simply inlines the calculation of the new MP to be minted based on the lock up time delta. It also removes a test that claims that `initialMP` should increase on `lock()`.
- Loading branch information