OSDN Git Service

Fix mnemonic resp format (#1372)
authorHAOYUatHZ <37070449+HAOYUatHZ@users.noreply.github.com>
Mon, 1 Oct 2018 11:52:12 +0000 (19:52 +0800)
committerPaladz <yzhu101@uottawa.ca>
Mon, 1 Oct 2018 11:52:12 +0000 (19:52 +0800)
api/hsm.go

index ebba716..fead0b3 100644 (file)
@@ -14,13 +14,13 @@ type createKeyResp struct {
        Alias    string       `json:"alias"`
        XPub     chainkd.XPub `json:"xpub"`
        File     string       `json:"file"`
-       Mnemonic string       `json:"mnemonic"`
+       Mnemonic string       `json:"mnemonic,omitempty"`
 }
 
 func (a *API) pseudohsmCreateKey(ctx context.Context, in struct {
        Alias    string `json:"alias"`
        Password string `json:"password"`
-       Mnemonic string `json:"nnemonic"`
+       Mnemonic string `json:"mnemonic"`
        Language string `json:"language"`
 }) Response {
        if in.Language == "" {