Skip to content

Commit

Permalink
fixed printing for logs
Browse files Browse the repository at this point in the history
  • Loading branch information
FroVolod committed Mar 4, 2025
1 parent 86df900 commit 62129ca
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/commands/contract/call_function/as_read_only/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ fn call_view_function(
info_str.push_str("\n------------------------------------");
tracing::info!(
parent: &tracing::Span::none(),
"--- Result -------------------------\n{}",
"--- Result -------------------------{}",
crate::common::indent_payload(&info_str)
);
Ok(())
Expand Down
13 changes: 7 additions & 6 deletions src/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1385,10 +1385,11 @@ pub fn print_transaction_status(
}
));

logs_result_output.push_str(&format!("\nTransaction ID: {id}\nTo see the transaction in the transaction explorer, please open this url in your browser:\n{path}{id}\n",
id=transaction_info.transaction_outcome.id,
path=network_config.explorer_transaction_url
));
logs_result_output.push_str(&format!(
"\nTransaction ID: {id}\nTo see the transaction in the transaction explorer, please open this url in your browser:\n{path}{id}\n",
id=transaction_info.transaction_outcome.id,
path=network_config.explorer_transaction_url
));

tracing::info!(
parent: &tracing::Span::none(),
Expand Down Expand Up @@ -1425,7 +1426,7 @@ pub fn save_access_key_to_keychain_or_save_to_legacy_keychain(
tracing::warn!(
parent: &tracing::Span::none(),
"\n{}",
crate::common::indent_payload(&info_str)
indent_payload(&info_str)
);
save_access_key_to_legacy_keychain(
network_config.clone(),
Expand Down Expand Up @@ -2697,7 +2698,7 @@ pub impl near_primitives::views::CallResult {
tracing::info!(
parent: &tracing::Span::none(),
"--- Logs ---------------------------{}\n",
crate::common::indent_payload(&info_str)
indent_payload(&info_str)
);
}
}
Expand Down

0 comments on commit 62129ca

Please sign in to comment.