Skip to content

Commit

Permalink
Print validator email, website, discord handle, and description in te…
Browse files Browse the repository at this point in the history
…st-vectors.
  • Loading branch information
murisi committed Nov 16, 2023
1 parent a0b6534 commit 5b24e82
Showing 1 changed file with 28 additions and 5 deletions.
33 changes: 28 additions & 5 deletions sdk/src/signing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1086,8 +1086,19 @@ pub async fn to_ledger_vector<'a>(
"Maximum commission rate change : {}",
init_validator.max_commission_rate_change,
),
format!("Validator VP type : {}", vp_code),
format!("Email : {}", init_validator.email),
]);
if let Some(description) = &init_validator.description {
tv.output.push(format!("Description : {}", description));
}
if let Some(website) = &init_validator.website {
tv.output.push(format!("Website : {}", website));
}
if let Some(discord_handle) = &init_validator.discord_handle {
tv.output
.push(format!("Discord handle : {}", discord_handle));
}
tv.output.push(format!("Validator VP type : {}", vp_code));

tv.output_expert.extend(
init_validator
Expand All @@ -1106,11 +1117,23 @@ pub async fn to_ledger_vector<'a>(
"Maximum commission rate change : {}",
init_validator.max_commission_rate_change
),
format!(
"Validator VP type : {}",
HEXLOWER.encode(&extra.code.hash().0)
),
format!("Email : {}", init_validator.email),
]);
if let Some(description) = &init_validator.description {
tv.output_expert
.push(format!("Description : {}", description));
}
if let Some(website) = &init_validator.website {
tv.output_expert.push(format!("Website : {}", website));
}
if let Some(discord_handle) = &init_validator.discord_handle {
tv.output_expert
.push(format!("Discord handle : {}", discord_handle));
}
tv.output_expert.push(format!(
"Validator VP type : {}",
HEXLOWER.encode(&extra.code.hash().0)
));
} else if code_sec.tag == Some(TX_INIT_PROPOSAL.to_string()) {
let init_proposal_data = InitProposalData::try_from_slice(
&tx.data()
Expand Down

0 comments on commit 5b24e82

Please sign in to comment.