diff --git a/user/id.go b/user/id.go index 2d64d43..d185992 100644 --- a/user/id.go +++ b/user/id.go @@ -73,8 +73,9 @@ func (x *ID) SetScriptHash(scriptHash util.Uint160) { } // ScriptHash calculates and returns script hash of ID. -func (x *ID) ScriptHash() (util.Uint160, error) { - return util.Uint160DecodeBytesBE(x.w[1:21]) +func (x *ID) ScriptHash() util.Uint160 { + res, _ := util.Uint160DecodeBytesBE(x.w[1:21]) + return res } // WalletBytes returns FrostFS user ID as Neo3 wallet address in a binary format. diff --git a/user/id_test.go b/user/id_test.go index afeb746..c517dc5 100644 --- a/user/id_test.go +++ b/user/id_test.go @@ -51,8 +51,7 @@ func TestID_SetScriptHash(t *testing.T) { func TestID_ScriptHash(t *testing.T) { userID := usertest.ID() - scriptHash, err := userID.ScriptHash() - require.NoError(t, err) + scriptHash := userID.ScriptHash() ownerAddress := userID.EncodeToString() decodedScriptHash, err := address.StringToUint160(ownerAddress)