diff --git a/policy/policy_contract.go b/policy/policy_contract.go index 067450c..89b0ae8 100644 --- a/policy/policy_contract.go +++ b/policy/policy_contract.go @@ -23,9 +23,9 @@ const ( ) const ( - // ErrNotAutorized is returned when the none of the transaction signers + // ErrNotAuthorized is returned when the none of the transaction signers // belongs to the list of autorized keys. - ErrNotAutorized = "none of the signers is not autorized to change the contract" + ErrNotAuthorized = "none of the signers is authorized to change the contract" ) // _deploy function sets up initial list of inner ring public keys. @@ -55,7 +55,7 @@ func checkAuthorization(ctx storage.Context) { return } - panic(ErrNotAutorized) + panic(ErrNotAuthorized) } func SetAdmin(addr interop.Hash160) { diff --git a/tests/policy_test.go b/tests/policy_test.go index 117a42c..9cc2bee 100644 --- a/tests/policy_test.go +++ b/tests/policy_test.go @@ -81,7 +81,7 @@ func TestAutorization(t *testing.T) { c := e.WithSigners(s) args := []any{policy.Container, "cnr1", "ingress:myrule3", []byte("opaque")} - c.InvokeFail(t, policy.ErrNotAutorized, "addChain", args...) + c.InvokeFail(t, policy.ErrNotAuthorized, "addChain", args...) e.Invoke(t, stackitem.Null{}, "setAdmin", s.ScriptHash()) e.Invoke(t, stackitem.NewBuffer(s.ScriptHash().BytesBE()), "getAdmin")