88 keypair:: DefaultSigner ,
99 } ,
1010 solana_client:: rpc_client:: RpcClient ,
11- solana_remote_wallet:: remote_wallet:: RemoteWalletManager ,
1211 solana_sdk:: { commitment_config:: CommitmentConfig , native_token:: Sol , signature:: Signer } ,
1312 std:: { env, process:: exit, sync:: Arc } ,
1413} ;
14+
15+ #[ cfg( feature = "remote-wallet" ) ]
16+ use solana_remote_wallet:: remote_wallet:: RemoteWalletManager ;
1517pub mod clparse;
1618pub mod prelude;
1719pub mod utils;
@@ -29,8 +31,13 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
2931 let app_matches = parse_command_line ( ) ;
3032 let ( sub_command, sub_matches) = app_matches. subcommand ( ) ;
3133 let matches = sub_matches. unwrap ( ) ;
34+
35+ #[ cfg( feature = "remote-wallet" ) ]
3236 let mut wallet_manager: Option < Arc < RemoteWalletManager > > = None ;
3337
38+ #[ cfg( not( feature = "remote-wallet" ) ) ]
39+ let wallet_manager = None ;
40+
3441 // Check if colors should be disabled (via flag or environment variable)
3542 let no_color = matches. is_present ( "no_color" ) || env:: var ( "NO_COLOR" ) . is_ok ( ) ;
3643 if no_color {
@@ -60,12 +67,20 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
6067 . unwrap_or ( & cli_config. json_rpc_url )
6168 . to_string ( ) ,
6269 ) ,
70+ #[ cfg( feature = "remote-wallet" ) ]
6371 default_signer : default_signer
6472 . signer_from_path ( matches, & mut wallet_manager)
6573 . unwrap_or_else ( |err| {
6674 eprintln ! ( "error: {}" , err) ;
6775 exit ( 1 ) ;
6876 } ) ,
77+ #[ cfg( not( feature = "remote-wallet" ) ) ]
78+ default_signer : default_signer
79+ . signer_from_path ( matches, & None )
80+ . unwrap_or_else ( |err| {
81+ eprintln ! ( "error: {}" , err) ;
82+ exit ( 1 ) ;
83+ } ) ,
6984 // Count occurrences of the verbose flag to determine verbosity level
7085 verbose : matches. occurrences_of ( "verbose" ) as u8 ,
7186 no_color,
0 commit comments