@@ -26,7 +26,12 @@ use clap::Parser;
26
26
) ) ]
27
27
#[ command( group(
28
28
// Ensure at most one mode is specified and ony if using "id" as a source.
29
- clap:: ArgGroup :: new( "mode" ) . required( false ) . multiple( false ) . requires( "id" )
29
+ // The `conflicts_with_all` here should not be required but it looks like Clap is getting a little confused
30
+ clap:: ArgGroup :: new( "mode" )
31
+ . required( false )
32
+ . multiple( false )
33
+ . requires( "ID" ) . conflicts_with_all( [ "from_io" , "from_transition" , "from_program" ]
34
+ )
30
35
) ) ]
31
36
pub struct LeoTransaction {
32
37
#[ clap( name = "ID" , help = "The ID of the transaction to fetch" , group = "source" ) ]
@@ -38,21 +43,21 @@ pub struct LeoTransaction {
38
43
#[ arg(
39
44
value_name = "INPUT_OR_OUTPUT_ID" ,
40
45
long,
41
- help = "Get the transition id that an input or output id occurred in" ,
46
+ help = "Get the ID of the transaction that an input or output ID occurred in" ,
42
47
group = "source"
43
48
) ]
44
49
pub ( crate ) from_io : Option < String > ,
45
50
#[ arg(
46
51
value_name = "TRANSITION_ID" ,
47
52
long,
48
- help = "Get the id of the transaction containing the specified transition" ,
53
+ help = "Get the ID of the transaction containing the specified transition" ,
49
54
group = "source"
50
55
) ]
51
56
pub ( crate ) from_transition : Option < String > ,
52
57
#[ arg(
53
58
value_name = "PROGRAM" ,
54
59
long,
55
- help = "Get the id of the transaction id that the specified program was deployed in" ,
60
+ help = "Get the ID of the transaction that the specified program was deployed in" ,
56
61
group = "source"
57
62
) ]
58
63
pub ( crate ) from_program : Option < String > ,
0 commit comments