Skip to content

Commit

Permalink
Fixed error name
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhmakAS committed Mar 25, 2024
1 parent c021926 commit f21f48d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/types/cl_value/uref_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func Test_NewURefFromString_IncorrectFormat(t *testing.T) {
source := "01506f4df2ac64a2233e787c430dc91dad5cee8eabd7d64555f64bdc1a4b4044d7"
_, err := key.NewURef(source)
require.Error(t, err)
assert.Equal(t, err, key.ErrIncorrectPurseFormat)
assert.Equal(t, err, key.ErrIncorrectUrefFormat)
}

func Test_FromBytesByType_URef(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions types/key/uref.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
type UrefAccess = byte

var (
ErrIncorrectPurseFormat = errors.New("incorrect uref format")
ErrIncorrectUrefFormat = errors.New("incorrect uref format")
)

const (
Expand Down Expand Up @@ -90,7 +90,7 @@ func (v URef) GobEncode() ([]byte, error) {
func NewURef(source string) (res URef, err error) {
parts := strings.Split(source, "-")
if len(parts) != 3 {
return res, ErrIncorrectPurseFormat
return res, ErrIncorrectUrefFormat
}

payloadInBytes, err := hex.DecodeString(parts[1])
Expand Down

0 comments on commit f21f48d

Please sign in to comment.