Skip to content

Commit

Permalink
chore: clean up silent flag
Browse files Browse the repository at this point in the history
  • Loading branch information
gpabst committed Oct 15, 2024
1 parent 0e188e2 commit 48fa4b3
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 10 deletions.
1 change: 0 additions & 1 deletion pkg/internal/common/flags/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,5 @@ func GetSignerFlags() []cli.Flag {
&FireblocksTimeoutFlag,
&FireblocksSecretStorageTypeFlag,
&Web3SignerUrlFlag,
&SilentFlag,
}
}
2 changes: 1 addition & 1 deletion pkg/internal/common/flags/general.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ var (
SilentFlag = cli.BoolFlag{
Name: "silent",
Aliases: []string{"s"},
Usage: "Suppress unnecessary output (except for claim data to enable piping)",
Usage: "Suppress unnecessary output",
EnvVars: []string{"SILENT"},
}
)
3 changes: 2 additions & 1 deletion pkg/rewards/claim.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ func getClaimFlags() []cli.Flag {
&ClaimTimestampFlag,
&ProofStoreBaseURLFlag,
&flags.VerboseFlag,
&flags.SilentFlag,
}

allFlags := append(baseFlags, flags.GetSignerFlags()...)
Expand Down Expand Up @@ -373,7 +374,7 @@ func readAndValidateClaimConfig(cCtx *cli.Context, logger logging.Logger) (*Clai
splitTokenAddresses := strings.Split(tokenAddresses, ",")
validTokenAddresses := getValidHexAddresses(splitTokenAddresses)
rewardsCoordinatorAddress := cCtx.String(RewardsCoordinatorAddressFlag.Name)
isSilent := cCtx.Bool(SilentFlag.Name)
isSilent := cCtx.Bool(flags.SilentFlag.Name)

var err error
if common.IsEmptyString(rewardsCoordinatorAddress) {
Expand Down
7 changes: 0 additions & 7 deletions pkg/rewards/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,4 @@ var (
Value: "all",
EnvVars: []string{"REWARDS_CLAIM_TYPE"},
}

SilentFlag = cli.BoolFlag{
Name: "silent",
Aliases: []string{"s"},
Usage: "Suppress output except for claim",
EnvVars: []string{"REWARDS_CLAIM_SILENT"},
}
)

0 comments on commit 48fa4b3

Please sign in to comment.