diff --git a/x/stakeibc/keeper/icacallbacks_undelegate.go b/x/stakeibc/keeper/icacallbacks_undelegate.go index 868ac500ed..6c882455a4 100644 --- a/x/stakeibc/keeper/icacallbacks_undelegate.go +++ b/x/stakeibc/keeper/icacallbacks_undelegate.go @@ -169,8 +169,8 @@ func (k Keeper) GetLatestCompletionTime(ctx sdk.Context, msgResponses [][]byte) } // UpdateHostZoneUnbondings does two things: -// 1. Update the status and time of each hostZoneUnbonding on each epochUnbondingRecord -// 2. Return the number of stTokens that need to be burned +// 1. Update the time of each hostZoneUnbonding on each epochUnbondingRecord +// 2. Return the number of stTokens that need to be burned func (k Keeper) UpdateHostZoneUnbondings( ctx sdk.Context, latestCompletionTime time.Time, @@ -196,8 +196,7 @@ func (k Keeper) UpdateHostZoneUnbondings( stTokenAmount := hostZoneUnbonding.StTokenAmount stTokenBurnAmount = stTokenBurnAmount.Add(stTokenAmount) - // Update the bonded status and time - hostZoneUnbonding.Status = recordstypes.HostZoneUnbonding_EXIT_TRANSFER_QUEUE + // Update the bonded time hostZoneUnbonding.UnbondingTime = cast.ToUint64(latestCompletionTime.UnixNano()) updatedEpochUnbondingRecord, success := k.RecordsKeeper.AddHostZoneToEpochUnbondingRecord(ctx, epochUnbondingRecord.EpochNumber, chainId, hostZoneUnbonding) if !success { diff --git a/x/stakeibc/keeper/icacallbacks_undelegate_test.go b/x/stakeibc/keeper/icacallbacks_undelegate_test.go index 5b46c35071..dd0ad38e11 100644 --- a/x/stakeibc/keeper/icacallbacks_undelegate_test.go +++ b/x/stakeibc/keeper/icacallbacks_undelegate_test.go @@ -361,7 +361,6 @@ func (s *KeeperTestSuite) TestUpdateHostZoneUnbondings_Success() { s.Require().True(found) hzu1 := epochUnbondingRecord1.HostZoneUnbondings[0] - s.Require().Equal(recordtypes.HostZoneUnbonding_EXIT_TRANSFER_QUEUE, hzu1.Status, "hzu1 status is EXIT_TRANSFER_QUEUE") s.Require().Equal(completionTime.UnixNano(), int64(hzu1.UnbondingTime), "hzu1 completion time is set") hzu2 := epochUnbondingRecord1.HostZoneUnbondings[1] @@ -369,7 +368,6 @@ func (s *KeeperTestSuite) TestUpdateHostZoneUnbondings_Success() { s.Require().Equal(int64(0), int64(hzu2.UnbondingTime), "hzu2 completion time is NOT set") hzu3 := epochUnbondingRecord2.HostZoneUnbondings[0] - s.Require().Equal(recordtypes.HostZoneUnbonding_EXIT_TRANSFER_QUEUE, hzu3.Status, "hzu3 status is EXIT_TRANSFER_QUEUE") s.Require().Equal(completionTime.UnixNano(), int64(hzu3.UnbondingTime), "hzu3 completion time is set") }