-
Notifications
You must be signed in to change notification settings - Fork 607
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add lockup duration edit method #1253
Conversation
remove gw file fdsa
Ah sweet! Lets add a hook for this? Also thoughts on renaming |
I was thinking about using this method for editing other part of the lockups in the future(e.g. cancelling unlock) so we can reduce the total number of messages. If you think they should be in different message, I agree ExtendLockup is a better name! |
I think they should be different messages! (It is an interesting API question if CancelUnlock should be expected behavior of extend lockup on an unbonding lockup, but I think thats a future question) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we also add tests for EditLockup
to check if the method has changed the lock as expected apart from the accumulation store check?
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
Codecov Report
@@ Coverage Diff @@
## main #1253 +/- ##
==========================================
- Coverage 19.82% 18.45% -1.38%
==========================================
Files 202 213 +11
Lines 27685 30216 +2531
==========================================
+ Hits 5489 5575 +86
- Misses 21175 23609 +2434
- Partials 1021 1032 +11
Continue to review full report at Codecov.
|
Closes #164 ? |
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
…ockup-increase-duration
…-labs/osmosis into mconcat/lockup-increase-duration
@mattverse wanna give this another look? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't want to block this PR for so long being picky 😅
Went through final review, should be good to merge after fix!
Co-authored-by: Matt, Park <45252226+mattverse@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🌮
k.hooks.OnTokenUnlocked(ctx, lock.OwnerAddress(), lock.ID, lock.Coins, oldLock.Duration, lock.EndTime) | ||
k.hooks.OnTokenLocked(ctx, lock.OwnerAddress(), lock.ID, lock.Coins, lock.Duration, lock.EndTime) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets re-assess these hook calls in a follow-up issue
@@ -261,3 +262,78 @@ func (suite *KeeperTestSuite) TestMsgBeginUnlockingAll() { | |||
} | |||
} | |||
} | |||
|
|||
func (suite *KeeperTestSuite) TestMsgEditLockup() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job on this test!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work on this!
Description
Closes: #164
For contributor use:
docs/
) or specification (x/<module>/spec/
)Unreleased
section inCHANGELOG.md
Files changed
in the Github PR explorer