From 63614e5c6c9ce60a12b71f34e47a710828241aa2 Mon Sep 17 00:00:00 2001 From: Frank <35358771+Frankonly@users.noreply.github.com> Date: Thu, 28 Mar 2019 11:54:19 -0700 Subject: [PATCH] Remove double check for action (#859) --- cli/ioctl/cmd/action/actionhash.go | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/cli/ioctl/cmd/action/actionhash.go b/cli/ioctl/cmd/action/actionhash.go index 4cafc2f638..afdeb9b0ed 100644 --- a/cli/ioctl/cmd/action/actionhash.go +++ b/cli/ioctl/cmd/action/actionhash.go @@ -66,23 +66,10 @@ func getActionByHash(args []string) string { return err.Error() } - request := &iotexapi.GetActionsRequest{ - Lookup: &iotexapi.GetActionsRequest_ByHash{ - ByHash: &iotexapi.GetActionByHashRequest{ - ActionHash: hash, - CheckPending: false, - }, - }, - } - _, err = cli.GetActions(ctx, request) - if err != nil { - return output + "\n#This action is pending\n" - } - requestGetReceipt := &iotexapi.GetReceiptByActionRequest{ActionHash: hash} responseReceipt, err := cli.GetReceiptByAction(ctx, requestGetReceipt) if err != nil { - return err.Error() + return output + "\n#This action is pending" } return output + "\n#This action has been written on blockchain\n" + printReceiptProto(responseReceipt.Receipt)