diff --git a/x/storage/keeper/keeper.go b/x/storage/keeper/keeper.go index 9f068e5f4..170bb2c98 100644 --- a/x/storage/keeper/keeper.go +++ b/x/storage/keeper/keeper.go @@ -474,7 +474,7 @@ func (k Keeper) DiscontinueBucket(ctx sdk.Context, operator sdk.AccAddress, buck if count+1 > max { return types.ErrNoMoreDiscontinue.Wrapf("no more buckets can be requested in this window") } - + previousStatus := bucketInfo.BucketStatus bucketInfo.BucketStatus = types.BUCKET_STATUS_DISCONTINUED store := ctx.KVStore(k.storeKey) @@ -486,7 +486,7 @@ func (k Keeper) DiscontinueBucket(ctx sdk.Context, operator sdk.AccAddress, buck k.appendDiscontinueBucketIds(ctx, deleteAt, []sdkmath.Uint{bucketInfo.Id}) k.SetDiscontinueBucketCount(ctx, operator, count+1) - if bucketInfo.BucketStatus == types.BUCKET_STATUS_MIGRATING { + if previousStatus == types.BUCKET_STATUS_MIGRATING { if err := ctx.EventManager().EmitTypedEvents(&types.EventCancelMigrationBucket{ Operator: operator.String(), BucketName: bucketInfo.BucketName,