Skip to content

Commit

Permalink
rename to
Browse files Browse the repository at this point in the history
  • Loading branch information
iboss-ptk committed Jul 17, 2023
1 parent c26756d commit d0ca709
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion x/superfluid/keeper/concentrated_liquidity.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion x/superfluid/keeper/migrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
4 changes: 2 additions & 2 deletions x/superfluid/keeper/stake.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down
4 changes: 2 additions & 2 deletions x/superfluid/keeper/stake_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
}
})
Expand Down

0 comments on commit d0ca709

Please sign in to comment.