Skip to content

Commit

Permalink
chore: fix some typos and function names in comment (#1070)
Browse files Browse the repository at this point in the history
Signed-off-by: fudancoder <[email protected].>
  • Loading branch information
fudancoder authored Dec 19, 2024
1 parent bb7495f commit e667c23
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion x/amm/types/pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion x/amm/types/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion x/burner/spec/02_state.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion x/commitment/keeper/msg_server_vest.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion x/epochs/spec/05_hooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.

Expand Down
2 changes: 1 addition & 1 deletion x/estaking/modules/distribution/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion x/tradeshield/keeper/msg_server_perpetual_order_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion x/transferhook/module_ibc.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit e667c23

Please sign in to comment.