diff --git a/accounts/hd.go b/accounts/hd.go index 574aa77f9f..30963326f8 100644 --- a/accounts/hd.go +++ b/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 {