@@ -631,6 +631,10 @@ pub async fn handle_offline_wallet_subcommand(
631631 //TODO: return status of wallet registration
632632 Ok ( json ! ( { "hmac" : hmac } ) )
633633 }
634+ HwiSubCommand :: Address => {
635+ let address = wallet. next_unused_address ( KeychainKind :: External ) ;
636+ Ok ( json ! ( { "address" : address. address } ) )
637+ }
634638 } ,
635639 }
636640}
@@ -1197,9 +1201,9 @@ pub(crate) async fn handle_command(cli_opts: CliOpts) -> Result<String, Error> {
11971201 }
11981202 } ;
11991203
1200- let mut wallet = new_persisted_wallet ( network, & mut persister, & wallet_opts) ?;
1204+ let mut wallet = new_persisted_wallet ( network, & mut persister, wallet_opts) ?;
12011205 let result =
1202- handle_offline_wallet_subcommand ( & mut wallet, & wallet_opts, & cli_opts, offline_subcommand. clone ( ) )
1206+ handle_offline_wallet_subcommand ( & mut wallet, wallet_opts, & cli_opts, offline_subcommand. clone ( ) )
12031207 . await ?;
12041208 wallet. persist ( & mut persister) ?;
12051209 result
@@ -1355,6 +1359,7 @@ async fn respond(
13551359 ReplSubCommand :: Exit => None ,
13561360 } ;
13571361 if let Some ( value) = response {
1362+ let value = serde_json:: to_string_pretty ( & value) . map_err ( |e| e. to_string ( ) ) ?;
13581363 writeln ! ( std:: io:: stdout( ) , "{value}" ) . map_err ( |e| e. to_string ( ) ) ?;
13591364 std:: io:: stdout ( ) . flush ( ) . map_err ( |e| e. to_string ( ) ) ?;
13601365 Ok ( false )
0 commit comments