diff --git a/x/superfluid/keeper/concentrated_liquidity.go b/x/superfluid/keeper/concentrated_liquidity.go index 56454d75bf7..fb1a80c7943 100644 --- a/x/superfluid/keeper/concentrated_liquidity.go +++ b/x/superfluid/keeper/concentrated_liquidity.go @@ -76,7 +76,7 @@ func (k Keeper) addToConcentratedLiquiditySuperfluidPosition(ctx sdk.Context, se // Superfluid undelegate the superfluid delegated position. // This deletes the connection between the lock and the intermediate account, deletes the synthetic lock, and burns the synthetic osmo. - intermediateAccount, err := k.SuperfluidUndelegateToConcentratedPosition(ctx, sender.String(), lockId) + intermediateAccount, err := k.ForceSuperfluidUndelegate(ctx, sender.String(), lockId) if err != nil { return 0, sdk.Int{}, sdk.Int{}, sdk.Dec{}, 0, err } diff --git a/x/superfluid/keeper/migrate.go b/x/superfluid/keeper/migrate.go index 47257b4bfa6..ffa5f3cd928 100644 --- a/x/superfluid/keeper/migrate.go +++ b/x/superfluid/keeper/migrate.go @@ -108,7 +108,7 @@ func (k Keeper) migrateSuperfluidBondedBalancerToConcentrated(ctx sdk.Context, // Note that lock's id is the same as the originalLockId since all shares are being migrated // and old lock is deleted gammLockToMigrate = preMigrationLock - intermediateAccount, err = k.SuperfluidUndelegateToConcentratedPosition(ctx, sender.String(), originalLockId) + intermediateAccount, err = k.ForceSuperfluidUndelegate(ctx, sender.String(), originalLockId) if err != nil { return 0, sdk.Int{}, sdk.Int{}, sdk.Dec{}, 0, 0, 0, err } diff --git a/x/superfluid/keeper/stake.go b/x/superfluid/keeper/stake.go index bd40b110a77..a6c9cbc24e0 100644 --- a/x/superfluid/keeper/stake.go +++ b/x/superfluid/keeper/stake.go @@ -300,11 +300,11 @@ func (k Keeper) SuperfluidUndelegate(ctx sdk.Context, sender string, lockID uint return k.createSyntheticLockup(ctx, lockID, intermediaryAcc, unlockingStatus) } -// SuperfluidUndelegateToConcentratedPosition starts undelegating superfluid delegated position for the given lock. It behaves similarly to SuperfluidUndelegate, +// ForceSuperfluidUndelegate starts undelegating superfluid delegated position for the given lock. It behaves similarly to SuperfluidUndelegate, // however it does not create a new synthetic lockup representing the unstaking side. This is because after the time this function is called, we might // want to perform more operations prior to creating a lock. Once the actual lock is created, the synthetic lockup representing the unstaking side // should eventually be created as well. Use this function with caution to avoid accidentally missing synthetic lock creation. -func (k Keeper) SuperfluidUndelegateToConcentratedPosition(ctx sdk.Context, sender string, gammLockID uint64) (types.SuperfluidIntermediaryAccount, error) { +func (k Keeper) ForceSuperfluidUndelegate(ctx sdk.Context, sender string, gammLockID uint64) (types.SuperfluidIntermediaryAccount, error) { return k.undelegateCommon(ctx, sender, gammLockID) } diff --git a/x/superfluid/keeper/stake_test.go b/x/superfluid/keeper/stake_test.go index 9060cca2163..8cb7722fc2e 100644 --- a/x/superfluid/keeper/stake_test.go +++ b/x/superfluid/keeper/stake_test.go @@ -529,7 +529,7 @@ func (s *KeeperTestSuite) TestSuperfluidUndelegateToConcentratedPosition() { presupplyWithOffset := s.App.BankKeeper.GetSupplyWithOffset(s.Ctx, bondDenom) // superfluid undelegate - _, err = s.App.SuperfluidKeeper.SuperfluidUndelegateToConcentratedPosition(s.Ctx, lock.Owner, lockId) + _, err = s.App.SuperfluidKeeper.ForceSuperfluidUndelegate(s.Ctx, lock.Owner, lockId) if tc.expSuperUnbondingErr[index] { s.Require().Error(err) continue @@ -584,7 +584,7 @@ func (s *KeeperTestSuite) TestSuperfluidUndelegateToConcentratedPosition() { lock, err := s.App.LockupKeeper.GetLockByID(s.Ctx, lockId) s.Require().NoError(err) - _, err = s.App.SuperfluidKeeper.SuperfluidUndelegateToConcentratedPosition(s.Ctx, lock.Owner, lockId) + _, err = s.App.SuperfluidKeeper.ForceSuperfluidUndelegate(s.Ctx, lock.Owner, lockId) s.Require().Error(err) } })