From e667c2363561d6a923b2d807918d6ba49a48d8e6 Mon Sep 17 00:00:00 2001 From: fudancoder <171416994+fudancoder@users.noreply.github.com> Date: Fri, 20 Dec 2024 02:00:41 +0800 Subject: [PATCH] chore: fix some typos and function names in comment (#1070) Signed-off-by: fudancoder --- x/amm/types/pool.go | 2 +- x/amm/types/utils.go | 2 +- x/burner/spec/02_state.md | 2 +- x/commitment/keeper/msg_server_vest.go | 2 +- x/epochs/spec/05_hooks.md | 2 +- x/estaking/modules/distribution/module.go | 2 +- x/tradeshield/keeper/msg_server_perpetual_order_test.go | 2 +- x/transferhook/module_ibc.go | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/x/amm/types/pool.go b/x/amm/types/pool.go index ee314fd1f..f535275bf 100644 --- a/x/amm/types/pool.go +++ b/x/amm/types/pool.go @@ -251,7 +251,7 @@ func (p Pool) GetAmmPoolBalance(denom string) (sdkmath.Int, error) { return sdkmath.ZeroInt(), ErrDenomNotFoundInPool } -// getMaximalNoSwapLPAmount returns the coins(lp liquidity) needed to get the specified amount of shares in the pool. +// GetMaximalNoSwapLPAmount returns the coins(lp liquidity) needed to get the specified amount of shares in the pool. // Steps to getting the needed lp liquidity coins needed for the share of the pools are // 1. calculate how much percent of the pool does given share account for(# of input shares / # of current total shares) // 2. since we know how much % of the pool we want, iterate through all pool liquidity to calculate how much coins we need for diff --git a/x/amm/types/utils.go b/x/amm/types/utils.go index 539daff91..05d6f2797 100644 --- a/x/amm/types/utils.go +++ b/x/amm/types/utils.go @@ -31,7 +31,7 @@ func poolAssetsCoins(assets []PoolAsset) sdk.Coins { return coins } -// ensureDenomInPool check to make sure the input denoms exist in the provided pool asset map +// EnsureDenomInPool check to make sure the input denoms exist in the provided pool asset map func EnsureDenomInPool(poolAssetsByDenom map[string]PoolAsset, tokensIn sdk.Coins) error { for _, coin := range tokensIn { _, ok := poolAssetsByDenom[coin.Denom] diff --git a/x/burner/spec/02_state.md b/x/burner/spec/02_state.md index ff912d048..608bc4a7d 100644 --- a/x/burner/spec/02_state.md +++ b/x/burner/spec/02_state.md @@ -16,7 +16,7 @@ The `x/burner` module keeps the following `objects in state`: A `History` defines several variables: -1. `timestamp` keeps the time the event occured +1. `timestamp` keeps the time the event occurred 2. `denom` keeps the token denom used 3. `amount` keeps the amount of tokens burnt diff --git a/x/commitment/keeper/msg_server_vest.go b/x/commitment/keeper/msg_server_vest.go index ee64ac3a9..e7a3e3fb3 100644 --- a/x/commitment/keeper/msg_server_vest.go +++ b/x/commitment/keeper/msg_server_vest.go @@ -25,7 +25,7 @@ func (k msgServer) Vest(goCtx context.Context, msg *types.MsgVest) (*types.MsgVe // Vesting token // Check if vesting entity count is not exceeding the maximum and if it is fine, creates a new vesting entity -// Deduct from unclaimed bucket. If it is insufficent, deduct from committed bucket as well. +// Deduct from unclaimed bucket. If it is insufficient, deduct from committed bucket as well. func (k Keeper) ProcessTokenVesting(ctx sdk.Context, denom string, amount math.Int, creator sdk.AccAddress) error { vestingInfo, _ := k.GetVestingInfo(ctx, denom) diff --git a/x/epochs/spec/05_hooks.md b/x/epochs/spec/05_hooks.md index a6f906ebf..c9dd5d80b 100644 --- a/x/epochs/spec/05_hooks.md +++ b/x/epochs/spec/05_hooks.md @@ -27,7 +27,7 @@ func (k Keeper) AfterEpochEnd(ctx sdk.Context, identifier string, epochNumber in func (k Keeper) BeforeEpochStart(ctx sdk.Context, identifier string, epochNumber int64) {...} ``` -## Recieving Hooks +## Receiving Hooks When other modules (outside of `x/epochs`) receive hooks, they need to filter the value `epochIdentifier`, and only do executions for a specific `epochIdentifier`. diff --git a/x/estaking/modules/distribution/module.go b/x/estaking/modules/distribution/module.go index 209b0dea8..d96bbcc35 100644 --- a/x/estaking/modules/distribution/module.go +++ b/x/estaking/modules/distribution/module.go @@ -73,7 +73,7 @@ func NewAppModule( } } -// BeginBlocker mirror functionality of cosmos-sdk/distribution BeginBlocker +// BeginBlock mirror functionality of cosmos-sdk/distribution BeginBlocker // however it allocates no proposer reward func (am AppModule) BeginBlock(goCtx context.Context) error { ctx := sdk.UnwrapSDKContext(goCtx) diff --git a/x/tradeshield/keeper/msg_server_perpetual_order_test.go b/x/tradeshield/keeper/msg_server_perpetual_order_test.go index 3734ea56c..9e2783415 100644 --- a/x/tradeshield/keeper/msg_server_perpetual_order_test.go +++ b/x/tradeshield/keeper/msg_server_perpetual_order_test.go @@ -195,7 +195,7 @@ func (suite *TradeshieldKeeperTestSuite) TestMsgServerUpdatePerpetualOrder() { } }, }, - // TODO: Add checks in code for triggerprice comparision with TakeProfitPrice and StopLossPrice + // TODO: Add checks in code for triggerprice comparison with TakeProfitPrice and StopLossPrice // Update Rate with >15 should not pass, but passing here { "Success: Update Perpetual Open Order", diff --git a/x/transferhook/module_ibc.go b/x/transferhook/module_ibc.go index 108f8aba6..c98105a40 100644 --- a/x/transferhook/module_ibc.go +++ b/x/transferhook/module_ibc.go @@ -180,7 +180,7 @@ func (im IBCModule) OnRecvPacket( im.keeper.Logger(ctx).Error(fmt.Sprintf("Packet from %s had amm routing info but transferhook amm routing is disabled", data.Sender)) return channeltypes.NewErrorAcknowledgement(types.ErrPacketForwardingInactive) } - im.keeper.Logger(ctx).Info(fmt.Sprintf("Forwaring packet from %s to amm", data.Sender)) + im.keeper.Logger(ctx).Info(fmt.Sprintf("Forwarding packet from %s to amm", data.Sender)) // swap operation if err := im.keeper.Swap(ctx, packet, data, routingInfo); err != nil {