Updated RequireInit, latest light-client

This commit is contained in:
Ethan Frey
2017-06-26 21:36:49 +02:00
parent e37c0cf538
commit e839a92f88
5 changed files with 10 additions and 18 deletions
+1 -5
View File
@@ -24,7 +24,7 @@ import (
var SendTxCmd = &cobra.Command{
Use: "send",
Short: "send tokens from one account to another",
RunE: doSendTx,
RunE: commands.RequireInit(doSendTx),
}
//nolint
@@ -47,10 +47,6 @@ func init() {
// runDemo is an example of how to make a tx
func doSendTx(cmd *cobra.Command, args []string) error {
if err := commands.RequireInit(cmd); err != nil {
return err
}
// load data from json or flags
tx := new(btypes.SendTx)
found, err := txcmd.LoadJSON(tx)
+1 -5
View File
@@ -16,14 +16,10 @@ import (
var AccountQueryCmd = &cobra.Command{
Use: "account [address]",
Short: "Get details of an account, with proof",
RunE: doAccountQuery,
RunE: lcmd.RequireInit(doAccountQuery),
}
func doAccountQuery(cmd *cobra.Command, args []string) error {
if err := lcmd.RequireInit(cmd); err != nil {
return err
}
addr, err := proofcmd.ParseHexKey(args, "address")
if err != nil {
return err