Skip to content

Commit

Permalink
handling golangci detection
Browse files Browse the repository at this point in the history
  • Loading branch information
seedlings-calm committed Mar 1, 2022
1 parent e493474 commit 91b01b0
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 120 deletions.
17 changes: 0 additions & 17 deletions cmd/plugchaind/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import (
onptypes "github.com/oracleNetworkProtocol/plugchain/types"
"github.com/spf13/cast"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
tmcli "github.com/tendermint/tendermint/libs/cli"
"github.com/tendermint/tendermint/libs/log"
dbm "github.com/tendermint/tm-db"
Expand Down Expand Up @@ -292,19 +291,3 @@ func (a appCreator) appExport(

return anApp.ExportAppStateAndValidators(forZeroHeight, jailAllowedAddrs)
}

func overwriteFlagDefaults(c *cobra.Command, defaults map[string]string) {
set := func(s *pflag.FlagSet, key, val string) {
if f := s.Lookup(key); f != nil {
f.DefValue = val
f.Value.Set(val)
}
}
for key, val := range defaults {
set(c.Flags(), key, val)
set(c.PersistentFlags(), key, val)
}
for _, c := range c.Commands() {
overwriteFlagDefaults(c, defaults)
}
}
31 changes: 0 additions & 31 deletions x/nft/keeper/keeper_test.go

This file was deleted.

14 changes: 0 additions & 14 deletions x/nft/keeper/msg_server_test.go

This file was deleted.

16 changes: 8 additions & 8 deletions x/token/client/cli/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,11 @@ func GetCmdIssueToken() *cobra.Command {
},
}
cmd.Flags().AddFlagSet(FsIssueToken)
cmd.MarkFlagRequired(FlagSymbol)
cmd.MarkFlagRequired(FlagName)
cmd.MarkFlagRequired(FlagInitialSupply)
cmd.MarkFlagRequired(FlagScale)
cmd.MarkFlagRequired(FlagMinUnit)
_ = cmd.MarkFlagRequired(FlagSymbol)
_ = cmd.MarkFlagRequired(FlagName)
_ = cmd.MarkFlagRequired(FlagInitialSupply)
_ = cmd.MarkFlagRequired(FlagScale)
_ = cmd.MarkFlagRequired(FlagMinUnit)
flags.AddTxFlagsToCmd(cmd)

return cmd
Expand Down Expand Up @@ -167,7 +167,7 @@ func GetCmdMintToken() *cobra.Command {

cmd.Flags().AddFlagSet(FsMintToken)

cmd.MarkFlagRequired(FlagAmount)
_ = cmd.MarkFlagRequired(FlagAmount)

flags.AddTxFlagsToCmd(cmd)

Expand Down Expand Up @@ -269,7 +269,7 @@ func GetCmdBurnToken() *cobra.Command {
},
}
cmd.Flags().AddFlagSet(FsMintToken)
cmd.MarkFlagRequired(FlagAmount)
_ = cmd.MarkFlagRequired(FlagAmount)

flags.AddTxFlagsToCmd(cmd)

Expand Down Expand Up @@ -319,7 +319,7 @@ func GetCmdTransferOwnerToken() *cobra.Command {
}

cmd.Flags().AddFlagSet(FsTransferOwnerToken)
cmd.MarkFlagRequired(FlagTo)
_ = cmd.MarkFlagRequired(FlagTo)

flags.AddTxFlagsToCmd(cmd)
return cmd
Expand Down
2 changes: 1 addition & 1 deletion x/token/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ func (k Keeper) BurnToken(ctx sdk.Context, symbol string, amount uint64, owner s
addrTotal := k.bankKeeper.GetBalance(ctx, owner, symbol)

if !addrTotal.Amount.GT(burnCoin.Amount) {
return sdkerrors.Wrapf(types.ErrInvalidAmount, "the amount exceeds the account token amount; expected (0, %d], got %d", addrTotal.Amount.String(), burnCoin.Amount.String())
return sdkerrors.Wrapf(types.ErrInvalidAmount, "Insufficient account balance")
}

if err := k.bankKeeper.SendCoinsFromAccountToModule(ctx, owner, types.ModuleName, burnCoins); err != nil {
Expand Down
35 changes: 0 additions & 35 deletions x/token/keeper/keeper_test.go

This file was deleted.

14 changes: 0 additions & 14 deletions x/token/keeper/msg_server_test.go

This file was deleted.

0 comments on commit 91b01b0

Please sign in to comment.