Conversation
|
It might help, the old PR #543 has partial unlocking implemented that you can reference to! |
|
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #893 +/- ##
==========================================
+ Coverage 20.38% 21.69% +1.30%
==========================================
Files 192 192
Lines 24783 25626 +843
==========================================
+ Hits 5053 5559 +506
- Misses 18798 19065 +267
- Partials 932 1002 +70 ☔ View full report in Codecov by Sentry. |
| return synthLocks | ||
| } | ||
|
|
||
| func (k Keeper) HasAnySyntheticLockups(ctx sdk.Context, lockID uint64) bool { |
There was a problem hiding this comment.
Nice, this is a good fn to have!
| locked = suite.app.LockupKeeper.GetAccountLockedCoins(suite.ctx, addr1) | ||
| suite.Require().Equal(len(locked), 1) | ||
| suite.Require().Equal(locked[0].Amount.Int64(), int64(10)) |
There was a problem hiding this comment.
GetAccountLockedCoins returns all coins that is qualified for reward, so it includes unlocking coins. Will add logic for checking 9 case!
Co-authored-by: Dev Ojha <ValarDragon@users.noreply.github.com>
* add partial unlock logic * add partial unlock test * fix lint * Apply suggestions from code review Co-authored-by: Dev Ojha <ValarDragon@users.noreply.github.com> * add test for case after unlocking period Co-authored-by: Dev Ojha <ValarDragon@users.noreply.github.com>
TODO
Description
For contributor use:
docs/) or specification (x/<module>/spec/)Unreleasedsection inCHANGELOG.mdFiles changedin the Github PR explorer