Updated RequireInit, latest light-client
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user