Skip to content

Commit

Permalink
Remove double check for action (#859)
Browse files Browse the repository at this point in the history
  • Loading branch information
Frankonly authored and zjshen14 committed Mar 28, 2019
1 parent 8a27218 commit 63614e5
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions cli/ioctl/cmd/action/actionhash.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 63614e5

Please sign in to comment.