Skip to content

Commit

Permalink
Update GetCmdIssueDenom to allow schema flag be file path (#78)
Browse files Browse the repository at this point in the history
* update GetCmdIssueDenom to allow schema flag be file path

* update schema flag

Co-authored-by: 王迪 <wangdi@bianjie.ai>
  • Loading branch information
dgsbl and 王迪 authored Jan 19, 2021
1 parent 31c79bb commit 5a59684
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion modules/nft/client/cli/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package cli

import (
"fmt"
"io/ioutil"
"strings"

"github.com/spf13/cobra"
Expand Down Expand Up @@ -45,7 +46,7 @@ func GetCmdIssueDenom() *cobra.Command {
"$ %s tx nft issue <denom-id> "+
"--from=<key-name> "+
"--name=<denom-name> "+
"--schema=<schema> "+
"--schema=<schema-content or path to schema.json> "+
"--chain-id=<chain-id> "+
"--fees=<fee>",
version.AppName,
Expand All @@ -65,6 +66,10 @@ func GetCmdIssueDenom() *cobra.Command {
if err != nil {
return err
}
optionsContent, err := ioutil.ReadFile(schema)
if err == nil {
schema = string(optionsContent)
}

msg := types.NewMsgIssueDenom(
args[0],
Expand Down

0 comments on commit 5a59684

Please sign in to comment.