From ccf272a34a057b067f8d32f0942856c2bd4e398d Mon Sep 17 00:00:00 2001 From: hanghuge <166206050+hanghuge@users.noreply.github.com> Date: Sat, 7 Dec 2024 17:36:18 +0800 Subject: [PATCH] chore: fix some function names in comment (#1038) Signed-off-by: hanghuge --- x/leveragelp/keeper/pool.go | 2 +- x/perpetual/keeper/pool.go | 2 +- x/perpetual/types/calc_funding_rate.go | 2 +- x/tradeshield/keeper/pending_spot_order.go | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/x/leveragelp/keeper/pool.go b/x/leveragelp/keeper/pool.go index 67d11d704..f04da4be6 100644 --- a/x/leveragelp/keeper/pool.go +++ b/x/leveragelp/keeper/pool.go @@ -14,7 +14,7 @@ func (k Keeper) RemovePool(ctx sdk.Context, index uint64) { store.Delete(types.PoolKey(index)) } -// GetAllPool returns all pool +// GetAllPools returns all pool func (k Keeper) GetAllPools(ctx sdk.Context) (list []types.Pool) { store := prefix.NewStore(runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)), types.KeyPrefix(types.PoolKeyPrefix)) iterator := storetypes.KVStorePrefixIterator(store, []byte{}) diff --git a/x/perpetual/keeper/pool.go b/x/perpetual/keeper/pool.go index a4ce185eb..6890e691a 100644 --- a/x/perpetual/keeper/pool.go +++ b/x/perpetual/keeper/pool.go @@ -47,7 +47,7 @@ func (k Keeper) SetPool(ctx sdk.Context, pool types.Pool) { store.Set(key, b) } -// GetAllPool returns all pool +// GetAllPools returns all pool func (k Keeper) GetAllPools(ctx sdk.Context) (list []types.Pool) { store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) iterator := storetypes.KVStorePrefixIterator(store, types.PoolKeyPrefix) diff --git a/x/perpetual/types/calc_funding_rate.go b/x/perpetual/types/calc_funding_rate.go index 6fbd68782..834c8d6d4 100644 --- a/x/perpetual/types/calc_funding_rate.go +++ b/x/perpetual/types/calc_funding_rate.go @@ -4,7 +4,7 @@ import ( sdkmath "cosmossdk.io/math" ) -// CalculateFundingRate calculates and returns the funding rate based on long and short amounts +// CalcFundingRate calculates and returns the funding rate based on long and short amounts func CalcFundingRate(longAmount, shortAmount sdkmath.Int, baseRate, maxRate, minRate sdkmath.LegacyDec) sdkmath.LegacyDec { var ratio sdkmath.LegacyDec diff --git a/x/tradeshield/keeper/pending_spot_order.go b/x/tradeshield/keeper/pending_spot_order.go index 04e4a87ab..d90c567fb 100644 --- a/x/tradeshield/keeper/pending_spot_order.go +++ b/x/tradeshield/keeper/pending_spot_order.go @@ -182,7 +182,7 @@ func (k Keeper) DeleteAllPendingSpotOrder(ctx sdk.Context) (list []types.SpotOrd return } -// ExecuteStopLossSpotOrder executes a stop loss order +// ExecuteStopLossOrder executes a stop loss order func (k Keeper) ExecuteStopLossOrder(ctx sdk.Context, order types.SpotOrder) (*ammtypes.MsgSwapByDenomResponse, error) { marketPrice, err := k.GetAssetPriceFromDenomInToDenomOut(ctx, order.OrderPrice.BaseDenom, order.OrderPrice.QuoteDenom) if err != nil {