Skip to content

Commit

Permalink
fix to use proper variable for class prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
beer-1 committed Aug 7, 2024
1 parent 76d4cda commit f87cdd5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions x/move/types/class.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ type CollectionKeeper interface {

func CollectionAddressFromClassId(classId string) (vmtypes.AccountAddress, error) {
if strings.HasPrefix(classId, ClassTraceClassIdPrefixMove) {
addrBz, err := hex.DecodeString(strings.TrimPrefix(classId, DenomTraceDenomPrefixMove))
addrBz, err := hex.DecodeString(strings.TrimPrefix(classId, ClassTraceClassIdPrefixMove))

Check warning on line 35 in x/move/types/class.go

View check run for this annotation

Codecov / codecov/patch

x/move/types/class.go#L35

Added line #L35 was not covered by tests
if err != nil {
return vmtypes.AccountAddress{}, err
}
Expand All @@ -53,7 +53,7 @@ func ClassIdFromCollectionAddress(ctx context.Context, k CollectionKeeper, colle

// If a nft is not ibc, add `move/` prefix
if creator != vmtypes.StdAddress {
return DenomTraceDenomPrefixMove + collection.CanonicalString(), nil
return ClassTraceClassIdPrefixMove + collection.CanonicalString(), nil

Check warning on line 56 in x/move/types/class.go

View check run for this annotation

Codecov / codecov/patch

x/move/types/class.go#L56

Added line #L56 was not covered by tests
}

// Else name == classId
Expand Down

0 comments on commit f87cdd5

Please sign in to comment.