-
Notifications
You must be signed in to change notification settings - Fork 620
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 Hook for Extend Lockup Duration #1405
Conversation
x/lockup/types/hooks.go
Outdated
@@ -12,6 +12,7 @@ type LockupHooks interface { | |||
OnStartUnlock(ctx sdk.Context, address sdk.AccAddress, lockID uint64, amount sdk.Coins, lockDuration time.Duration, unlockTime time.Time) | |||
OnTokenUnlocked(ctx sdk.Context, address sdk.AccAddress, lockID uint64, amount sdk.Coins, lockDuration time.Duration, unlockTime time.Time) | |||
OnTokenSlashed(ctx sdk.Context, lockID uint64, amount sdk.Coins) | |||
OnLockupExtend(ctx sdk.Context, address sdk.AccAddress, lockID uint64, amount sdk.Coins, prevDuration time.Duration, newDuration time.Duration, unlockTime time.Time) |
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.
Should the API be ctx, lockID, oldDuration
?
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.
I just put all the fields on the method, if that is sufficient I think it is good(although maybe adding newDuration?)
Codecov Report
@@ Coverage Diff @@
## main #1405 +/- ##
==========================================
- Coverage 19.82% 19.53% -0.29%
==========================================
Files 202 226 +24
Lines 27685 30953 +3268
==========================================
+ Hits 5489 6048 +559
- Misses 21175 23800 +2625
- Partials 1021 1105 +84
Continue to review full report at Codecov.
|
Closes: #1404
What is the purpose of the change
*Add a description of the overall background and high level changes that this PR introduces *
(E.g.: This pull request improves documation of area A by adding ....
Brief change log
(for example:)
Testing and Verifying
(Please pick one of the following options)
This change is a trivial rework / code cleanup without any test coverage.
(or)
This change is already covered by existing tests, such as (please describe tests).
(or)
This change added tests and can be verified as follows:
(example:)
Documentation and Release Note
Unreleased
section inCHANGELOG.md
? (yes / no)x/<module>/spec/
) / Osmosis docs repo / not documented)