Skip to content

Commit

Permalink
refactored print_value_successful_transaction()
Browse files Browse the repository at this point in the history
  • Loading branch information
FroVolod committed Feb 21, 2025
1 parent fa72ba2 commit 7170b9f
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -831,16 +831,16 @@ fn print_value_successful_transaction(
public_key: _,
} => {
if stake == 0 {
eprintln!(
"Validator <{}> successfully unstaked.",
info_str.push_str(&format!(
"\nValidator <{}> successfully unstaked.",
transaction_info.transaction.signer_id,
);
));
} else {
eprintln!(
"Validator <{}> has successfully staked {}.",
info_str.push_str(&format!(
"\nValidator <{}> has successfully staked {}.",
transaction_info.transaction.signer_id,
crate::types::near_token::NearToken::from_yoctonear(stake),
);
));
}
}
near_primitives::views::ActionView::AddKey {
Expand All @@ -853,10 +853,10 @@ fn print_value_successful_transaction(
));
}
near_primitives::views::ActionView::DeleteKey { public_key } => {
eprintln!(
"Access key <{}> for account <{}> has been successfully deleted.",
info_str.push_str(&format!(
"\nAccess key <{}> for account <{}> has been successfully deleted.",
public_key, transaction_info.transaction.signer_id,
);
));
}
near_primitives::views::ActionView::DeleteAccount { beneficiary_id: _ } => {
info_str.push_str(&format!(
Expand Down

0 comments on commit 7170b9f

Please sign in to comment.