Skip to content

Commit

Permalink
fix govet lint issue
Browse files Browse the repository at this point in the history
  • Loading branch information
harish551 committed Aug 14, 2024
1 parent e84fe37 commit 0c4d343
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
3 changes: 2 additions & 1 deletion x/streampay/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@ func (k Keeper) StopStreamPayment(ctx sdk.Context, streamId string, sender sdk.A
if !streamPayment.Cancellable {
return errorsmod.Wrapf(
sdkerrors.ErrUnauthorized,
fmt.Sprintf("stream payment %s is not cancellable", streamId),
"stream payment %s is not cancellable",
streamId,
)
}
if ctx.BlockTime().Unix() > streamPayment.EndTime.Unix() {
Expand Down
10 changes: 6 additions & 4 deletions x/streampay/types/validation.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package types

import (
"fmt"
"time"

sdkmath "cosmossdk.io/math"
Expand Down Expand Up @@ -34,7 +33,8 @@ func validateStreamAmount(amount sdk.Coin) error {
if !amount.IsValid() || amount.IsNil() || amount.Amount.LTE(sdkmath.ZeroInt()) {
return errorsmod.Wrapf(
ErrInvalidAmount,
fmt.Sprintf("amount %s is not valid", amount.String()),
"amount %s is not valid",
amount.String(),
)
}
return nil
Expand All @@ -44,7 +44,8 @@ func validateFeeAmount(amount sdk.Coin) error {
if !amount.IsValid() || amount.IsNil() || amount.Amount.LT(sdkmath.ZeroInt()) {
return errorsmod.Wrapf(
ErrInvalidAmount,
fmt.Sprintf("fee amount %s is not valid", amount.String()),
"fee amount %s is not valid",
amount.String(),
)
}
return nil
Expand All @@ -54,7 +55,8 @@ func validateStreamType(_type StreamType) error {
if !(_type == TypeDelayed || _type == TypeContinuous || _type == TypePeriodic) {
return errorsmod.Wrapf(
ErrInvalidStreamPaymentType,
fmt.Sprintf("stream payment type %s is not valid", _type),
"stream payment type %s is not valid",
_type,
)
}
return nil
Expand Down

0 comments on commit 0c4d343

Please sign in to comment.