feat: Added optional vote comment to the proposal vote fields
This commit is contained in:
@@ -39,9 +39,9 @@ fn main() {
|
||||
);
|
||||
|
||||
// Add vote options
|
||||
proposal = proposal.add_option(1, "Approve Allocation");
|
||||
proposal = proposal.add_option(2, "Reject Allocation");
|
||||
proposal = proposal.add_option(3, "Abstain");
|
||||
proposal = proposal.add_option(1, "Approve Allocation", Some("This is the approval option"));
|
||||
proposal = proposal.add_option(2, "Reject Allocation", Some("This is the rejection option"));
|
||||
proposal = proposal.add_option(3, "Abstain", Some("This is the abstain option"));
|
||||
|
||||
println!("Added Vote Options:");
|
||||
for option in &proposal.options {
|
||||
@@ -139,8 +139,16 @@ fn main() {
|
||||
Utc::now() + Duration::days(7),
|
||||
);
|
||||
private_proposal.private_group = Some(vec![10, 20, 30]); // Only users 10, 20, 30 can vote
|
||||
private_proposal = private_proposal.add_option(1, "Accept Restructure");
|
||||
private_proposal = private_proposal.add_option(2, "Reject Restructure");
|
||||
private_proposal = private_proposal.add_option(
|
||||
1,
|
||||
"Accept Restructure",
|
||||
Some("This is the accept restructure option".to_string()),
|
||||
);
|
||||
private_proposal = private_proposal.add_option(
|
||||
2,
|
||||
"Reject Restructure",
|
||||
Some("This is the reject restructure option".to_string()),
|
||||
);
|
||||
|
||||
println!(
|
||||
"\nBefore saving - Created Private Proposal: '{}'",
|
||||
|
Reference in New Issue
Block a user