'sanitize' JSON input

Co-Authored-By: gballet <gballet@gmail.com>
ChrisChinchilla-patch-3
Martin Holst Swende 6 years ago committed by Guillaume Ballet
parent 3b3e1bc07e
commit df5409c952
  1. 2
      accounts/hd.go

@ -136,7 +136,7 @@ func (path DerivationPath) String() string {
}
func (path DerivationPath) MarshalJSON() ([]byte, error) {
return []byte(fmt.Sprintf("\"%s\"", path.String())), nil
return json.Marshal(fmt.Sprintf("\"%s\"", path.String()))
}
func (path *DerivationPath) UnmarshalJSON(b []byte) error {

Loading…
Cancel
Save