Skip to content

Commit df5409c

Browse files
holimangballet
andcommitted
'sanitize' JSON input
Co-Authored-By: gballet <gballet@gmail.com>
1 parent 3b3e1bc commit df5409c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

accounts/hd.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ func (path DerivationPath) String() string {
136136
}
137137

138138
func (path DerivationPath) MarshalJSON() ([]byte, error) {
139-
return []byte(fmt.Sprintf("\"%s\"", path.String())), nil
139+
return json.Marshal(fmt.Sprintf("\"%s\"", path.String()))
140140
}
141141

142142
func (path *DerivationPath) UnmarshalJSON(b []byte) error {

0 commit comments

Comments
 (0)