1
1
use clap:: {
2
- crate_description, crate_name, crate_version, value_t , value_t_or_exit, App , AppSettings , Arg ,
2
+ crate_description, crate_name, crate_version, value_t_or_exit, App , AppSettings , Arg ,
3
3
SubCommand ,
4
4
} ;
5
5
use solana_account_decoder:: { parse_token:: TokenAccountType , UiAccountData } ;
@@ -477,6 +477,7 @@ fn main() {
477
477
. long ( "url" )
478
478
. value_name ( "URL" )
479
479
. takes_value ( true )
480
+ . global ( true )
480
481
. validator ( is_url)
481
482
. help ( "JSON RPC URL for the cluster. Default from the configuration file." ) ,
482
483
)
@@ -486,6 +487,7 @@ fn main() {
486
487
. value_name ( "KEYPAIR" )
487
488
. validator ( is_keypair)
488
489
. takes_value ( true )
490
+ . global ( true )
489
491
. help (
490
492
"Specify the token owner account. \
491
493
This may be a keypair file, the ASK keyword. \
@@ -498,6 +500,7 @@ fn main() {
498
500
. value_name ( "KEYPAIR" )
499
501
. validator ( is_keypair)
500
502
. takes_value ( true )
503
+ . global ( true )
501
504
. help (
502
505
"Specify the fee-payer account. \
503
506
This may be a keypair file, the ASK keyword. \
@@ -735,12 +738,16 @@ fn main() {
735
738
} else {
736
739
solana_cli_config:: Config :: default ( )
737
740
} ;
738
- let json_rpc_url = value_t ! ( matches, "json_rpc_url" , String )
739
- . unwrap_or_else ( |_| cli_config. json_rpc_url . clone ( ) ) ;
741
+ let json_rpc_url = matches
742
+ . value_of ( "json_rpc_url" )
743
+ . unwrap_or ( & cli_config. json_rpc_url )
744
+ . to_string ( ) ;
740
745
741
746
let owner = signer_from_path (
742
747
& matches,
743
- & cli_config. keypair_path ,
748
+ matches
749
+ . value_of ( "owner" )
750
+ . unwrap_or ( & cli_config. keypair_path ) ,
744
751
"owner" ,
745
752
& mut wallet_manager,
746
753
)
@@ -750,7 +757,9 @@ fn main() {
750
757
} ) ;
751
758
let fee_payer = signer_from_path (
752
759
& matches,
753
- & cli_config. keypair_path ,
760
+ matches
761
+ . value_of ( "fee_payer" )
762
+ . unwrap_or ( & cli_config. keypair_path ) ,
754
763
"fee_payer" ,
755
764
& mut wallet_manager,
756
765
)
0 commit comments