Skip to content

Commit

Permalink
Merge branch 'neitdung/msg-server-bugs' into msg-server-test
Browse files Browse the repository at this point in the history
  • Loading branch information
neitdung committed Jan 19, 2024
2 parents b019f7b + e49cf92 commit 0043dd9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions x/multi-staking/keeper/msg_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,14 @@ func (k msgServer) CancelUnbondingDelegation(goCtx context.Context, msg *staking
cancelBondAmount := cancelMSCoin.BondValue()
cancelUnbondingCoin := sdk.NewCoin(k.keeper.stakingKeeper.BondDenom(ctx), cancelBondAmount)

lockID := types.MultiStakingLockID(msg.DelegatorAddress, msg.ValidatorAddress)
lock := k.keeper.GetOrCreateMultiStakingLock(ctx, lockID)
err = lock.AddCoinToMultiStakingLock(cancelMSCoin)
if err != nil {
return nil, err
}
k.keeper.SetMultiStakingLock(ctx, lock)

sdkMsg := &stakingtypes.MsgCancelUnbondingDelegation{
DelegatorAddress: msg.DelegatorAddress,
ValidatorAddress: msg.ValidatorAddress,
Expand Down

0 comments on commit 0043dd9

Please sign in to comment.