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

Commit a8ed17a

Browse files
authored
Merge pull request #2100 from OpenBazaar/brian.fixChecksum
Do not strip 0x in the middle of the string
2 parents 876eab8 + 94b3c59 commit a8ed17a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

util/utils.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ const EmojiPattern = "[\\x{2712}\\x{2714}\\x{2716}\\x{271d}\\x{2721}\\x{2728}\\x
6565

6666
// NormalizeAddress is used to strip the 0x prefix
6767
func NormalizeAddress(addr string) string {
68-
return strings.Replace(addr, "0x", "", 1)
68+
return strings.TrimPrefix(addr, "0x")
6969
}
7070

7171
// AreAddressesEqual - check if addresses are equal after normalizing them

0 commit comments

Comments
 (0)