@@ -48,7 +48,7 @@ fn main() -> Result<(), ExecError> {
4848 LogLevel :: from_verbosity_flag_count ( args. verbose ) . apply ( ) ;
4949 trace ! ( "Command-line arguments: {:#?}" , & args) ;
5050
51- let client = RgbClient :: new ( args. remote , cb) ?;
51+ let client = RgbClient :: new ( args. remote , args . network , cb) ?;
5252
5353 args. command . exec ( client)
5454}
@@ -60,12 +60,18 @@ fn cb(reply: RgbRpcResp) {
6060 }
6161 RgbRpcResp :: Message ( msg) => {
6262 println ! ( "Message from RGB Node: {msg}" ) ;
63+ return ;
64+ }
65+ RgbRpcResp :: Pong ( _noise) => {
66+ return ;
6367 }
64- RgbRpcResp :: Pong ( _noise) => { }
6568 RgbRpcResp :: Status ( status) => {
6669 println ! ( "{}" , serde_yaml:: to_string( & status) . unwrap( ) ) ;
6770 }
6871 RgbRpcResp :: Contracts ( contracts) => {
72+ if contracts. is_empty ( ) {
73+ println ! ( "No contracts found" ) ;
74+ }
6975 for contract in contracts {
7076 println ! ( "---" ) ;
7177 println ! ( "{}" , serde_yaml:: to_string( & contract) . expect( "Unable to generate YAML" ) ) ;
@@ -78,6 +84,9 @@ fn cb(reply: RgbRpcResp) {
7884 RgbRpcResp :: Wallets ( wallets) => {
7985 println ! ( "Wallets:" ) ;
8086 println ! ( "Id\t Name\t Descriptor class" ) ;
87+ if wallets. is_empty ( ) {
88+ println ! ( "No wallets found" ) ;
89+ }
8190 for wallet in wallets {
8291 println ! ( "{}\t {}\t {}" , wallet. id, wallet. name, wallet. descriptor. class( ) )
8392 }
0 commit comments