Skip to content
This repository has been archived by the owner on Mar 28, 2023. It is now read-only.

Commit

Permalink
Merge pull request #2100 from OpenBazaar/brian.fixChecksum
Browse files Browse the repository at this point in the history
Do not strip 0x in the middle of the string
  • Loading branch information
cpacia committed Sep 18, 2020
2 parents 876eab8 + 94b3c59 commit a8ed17a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion util/utils.go
Expand Up @@ -65,7 +65,7 @@ const EmojiPattern = "[\\x{2712}\\x{2714}\\x{2716}\\x{271d}\\x{2721}\\x{2728}\\x

// NormalizeAddress is used to strip the 0x prefix
func NormalizeAddress(addr string) string {
return strings.Replace(addr, "0x", "", 1)
return strings.TrimPrefix(addr, "0x")
}

// AreAddressesEqual - check if addresses are equal after normalizing them
Expand Down

0 comments on commit a8ed17a

Please sign in to comment.