From 07a6e2cc43a1db5dbe953429dd3f5744b29ebd88 Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Mon, 11 Jan 2021 17:43:38 +0300 Subject: [PATCH] [#290] cmd/cli: Trim 0x prefix from salt argument of object hash cmd Signed-off-by: Leonard Lyubich --- cmd/neofs-cli/modules/object.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/neofs-cli/modules/object.go b/cmd/neofs-cli/modules/object.go index 60b517993..5ebdd3b86 100644 --- a/cmd/neofs-cli/modules/object.go +++ b/cmd/neofs-cli/modules/object.go @@ -432,7 +432,9 @@ func getObjectHash(cmd *cobra.Command, _ []string) error { return err } - salt, err := hex.DecodeString(cmd.Flag(getRangeHashSaltFlag).Value.String()) + strSalt := strings.TrimPrefix(cmd.Flag(getRangeHashSaltFlag).Value.String(), "0x") + + salt, err := hex.DecodeString(strSalt) if err != nil { return err }