-
Notifications
You must be signed in to change notification settings - Fork 17
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
Feat/add unbonding time #36
base: main
Are you sure you want to change the base?
Conversation
} | ||
|
||
for res in unbond_responses.into_iter() { | ||
response = response.add_attributes(res.clone().attributes); |
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.
Do we need to add_messages here as well for the _unbond messages?
@@ -100,6 +103,10 @@ pub fn execute(deps: DepsMut, env: Env, info: MessageInfo, msg: ExecuteMsg) -> S | |||
staker_addr, | |||
prev_staking_token_amount, | |||
), | |||
ExecuteMsg::UnbondLock { | |||
staking_token, | |||
lock_id, |
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.
For simplicity I think we can re-use the ExecuteMsg::Unbond by locking new amounts then unbonding old locks all in the same tx
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.
It is similar to MsgDelegate, where we delegate new tokens while withdrawing all rewards
amount, | ||
unlock_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.
we can refactor the unbond_lock logic so we can call it in here
Quality Gate passedKudos, no new issues were introduced! 0 New issues |
What this pr do?
LOCK_INFO
which is multiple array of lock assetlock.unlock_time < env.block.time