-
Notifications
You must be signed in to change notification settings - Fork 1.4k
refactor: refactoring Narg checks #12814
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -214,6 +214,10 @@ var msigInspectCmd = &cli.Command{ | |
|
||
store := adt.WrapStore(ctx, cbor.NewCborStore(blockstore.NewAPIBlockstore(api))) | ||
|
||
if cctx.NArg() != 1 { | ||
return IncorrectNumArgs(cctx) | ||
} | ||
|
||
ameeetgaikwad marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
maddr, err := address.NewFromString(cctx.Args().First()) | ||
if err != nil { | ||
return err | ||
|
@@ -399,7 +403,7 @@ var msigProposeCmd = &cli.Command{ | |
}, | ||
}, | ||
Action: func(cctx *cli.Context) error { | ||
if cctx.NArg() < 3 { | ||
if cctx.NArg() != 3 { | ||
|
||
return ShowHelp(cctx, fmt.Errorf("must pass at least multisig address, destination, and value")) | ||
} | ||
|
||
|
@@ -521,7 +525,7 @@ var msigApproveCmd = &cli.Command{ | |
}, | ||
}, | ||
Action: func(cctx *cli.Context) error { | ||
if cctx.NArg() < 2 { | ||
if cctx.NArg() != 2 { | ||
|
||
return ShowHelp(cctx, fmt.Errorf("must pass at least multisig address and message ID")) | ||
} | ||
|
||
|
@@ -658,7 +662,7 @@ var msigCancelCmd = &cli.Command{ | |
}, | ||
}, | ||
Action: func(cctx *cli.Context) error { | ||
if cctx.NArg() < 2 { | ||
if cctx.NArg() != 2 { | ||
|
||
return ShowHelp(cctx, fmt.Errorf("must pass at least multisig address and message ID")) | ||
} | ||
|
||
|
Uh oh!
There was an error while loading. Please reload this page.