Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
RafilxTenfen committed Jan 23, 2025
1 parent 1c53a22 commit 9faba8e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
9 changes: 5 additions & 4 deletions eotsmanager/cmd/eotsd/daemon/pop.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,10 @@ func NewPopDeleteCmd() *cobra.Command {
}

func validatePop(cmd *cobra.Command, args []string) error {
strExportJson := args[0]
strExportJSON := args[0]
var pop PoPExport
if err := json.Unmarshal([]byte(strExportJson), &pop); err != nil {
return fmt.Errorf("failed to marshal %s into PoPExport structure", strExportJson)
if err := json.Unmarshal([]byte(strExportJSON), &pop); err != nil {
return fmt.Errorf("failed to marshal %s into PoPExport structure", strExportJSON)
}

valid, err := ValidPopExport(pop)
Expand All @@ -167,7 +167,8 @@ func validatePop(cmd *cobra.Command, args []string) error {
return fmt.Errorf("invalid pop %+v", pop)
}

cmd.Println("Proof of Possesion is valid!")
cmd.Println("Proof of Possession is valid!")

return nil
}

Expand Down
3 changes: 2 additions & 1 deletion eotsmanager/cmd/eotsd/daemon/pop_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ func TestPoPVerify(t *testing.T) {
}

func TestPoPValidate(t *testing.T) {
t.Parallel()
validateCmd := daemon.NewPopValidateExportCmd()

for _, pop := range popsToVerify {
Expand All @@ -83,6 +84,6 @@ func TestPoPValidate(t *testing.T) {
err = validateCmd.ExecuteContext(context.Background())
require.NoError(t, err)

require.Equal(t, writer.String(), "Proof of Possesion is valid!\n")
require.Equal(t, writer.String(), "Proof of Possession is valid!\n")
}
}

0 comments on commit 9faba8e

Please sign in to comment.