Skip to content

Commit 63614e5

Browse files
Frankonlyzjshen14
authored andcommitted
Remove double check for action (#859)
1 parent 8a27218 commit 63614e5

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

cli/ioctl/cmd/action/actionhash.go

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -66,23 +66,10 @@ func getActionByHash(args []string) string {
6666
return err.Error()
6767
}
6868

69-
request := &iotexapi.GetActionsRequest{
70-
Lookup: &iotexapi.GetActionsRequest_ByHash{
71-
ByHash: &iotexapi.GetActionByHashRequest{
72-
ActionHash: hash,
73-
CheckPending: false,
74-
},
75-
},
76-
}
77-
_, err = cli.GetActions(ctx, request)
78-
if err != nil {
79-
return output + "\n#This action is pending\n"
80-
}
81-
8269
requestGetReceipt := &iotexapi.GetReceiptByActionRequest{ActionHash: hash}
8370
responseReceipt, err := cli.GetReceiptByAction(ctx, requestGetReceipt)
8471
if err != nil {
85-
return err.Error()
72+
return output + "\n#This action is pending"
8673
}
8774
return output + "\n#This action has been written on blockchain\n" +
8875
printReceiptProto(responseReceipt.Receipt)

0 commit comments

Comments
 (0)