Fix key rename command output error
License: MIT Signed-off-by: Xiaoyi Wang <wangxiaoyi@hyperchain.cn>
Xiaoyi Wang committed
Apr 22, 2018 at 11:45 UTC
b7ce80c0f587b637bfb721f8b45db4515680dd88
1 file changed
+5
-1
core/commands/keystore.go
+5
-1
@@ -306,7 +306,11 @@ var keyRenameCmd = &cmds.Command{
306
},
307
Marshalers: cmds.MarshalerMap{
308
cmds.Text: func(res cmds.Response) (io.Reader, error) {
309
- k, ok := res.Output().(*KeyRenameOutput)
309
+ v, err := unwrapOutput(res.Output())
310
+ if err != nil {
311
+ return nil, err
312
+ }
313
+ k, ok := v.(*KeyRenameOutput)
314
if !ok {
315
return nil, fmt.Errorf("expected a KeyRenameOutput as command result")
316
}