Unify all sender flags in CLI under the same name

This commit is contained in:
Aayush Rajasekaran 2020-07-07 17:37:43 -04:00
parent 99b5ec96a2
commit eac8a909e9
2 changed files with 7 additions and 7 deletions

View File

@ -385,8 +385,8 @@ var clientRetrieveCmd = &cli.Command{
ArgsUsage: "[dataCid outputPath]",
Flags: []cli.Flag{
&cli.StringFlag{
Name: "address",
Usage: "address to use for transactions",
Name: "from",
Usage: "address to send transactions from",
},
&cli.BoolFlag{
Name: "car",
@ -411,8 +411,8 @@ var clientRetrieveCmd = &cli.Command{
ctx := ReqContext(cctx)
var payer address.Address
if cctx.String("address") != "" {
payer, err = address.NewFromString(cctx.String("address"))
if cctx.String("from") != "" {
payer, err = address.NewFromString(cctx.String("from"))
} else {
payer, err = fapi.WalletDefaultAddress(ctx)
}
@ -498,7 +498,7 @@ var clientQueryAskCmd = &cli.Command{
},
Action: func(cctx *cli.Context) error {
if cctx.NArg() != 1 {
fmt.Println("Usage: query-ask [address]")
fmt.Println("Usage: query-ask [minerAddress]")
return nil
}

View File

@ -58,7 +58,7 @@ var msigCreateCmd = &cli.Command{
Value: "0",
},
&cli.StringFlag{
Name: "sender",
Name: "from",
Usage: "account to send the create message from",
},
},
@ -85,7 +85,7 @@ var msigCreateCmd = &cli.Command{
// get the address we're going to use to create the multisig (can be one of the above, as long as they have funds)
var sendAddr address.Address
if send := cctx.String("sender"); send == "" {
if send := cctx.String("from"); send == "" {
defaddr, err := api.WalletDefaultAddress(ctx)
if err != nil {
return err