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

View File

@ -58,7 +58,7 @@ var msigCreateCmd = &cli.Command{
Value: "0", Value: "0",
}, },
&cli.StringFlag{ &cli.StringFlag{
Name: "sender", Name: "from",
Usage: "account to send the create message 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) // 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 var sendAddr address.Address
if send := cctx.String("sender"); send == "" { if send := cctx.String("from"); send == "" {
defaddr, err := api.WalletDefaultAddress(ctx) defaddr, err := api.WalletDefaultAddress(ctx)
if err != nil { if err != nil {
return err return err