fix(rust): message send deletes --from node config
only delete node in case 'from' is empty and embedded node was started before
@@ -82,7 +82,11 @@ async fn rpc(mut ctx: Context, (opts, cmd): (CommandGlobalOpts, SendCommand)) ->
String::from_utf8(res).context("Received content is not a valid utf8 string")?
);
+ // only delete node in case 'from' is empty and embedded node was started before
+ if let None = &cmd.from {
delete_embedded_node(&opts.config, rpc.node_name()).await;
+ }
+
Ok(())
}
go(&mut ctx, &opts, cmd).await
