From 06d3a78fedb0e99e097fb0ea2e1dc7b01127ee12 Mon Sep 17 00:00:00 2001 From: Kylan Hurt Date: Fri, 10 Mar 2023 20:31:53 -0600 Subject: [PATCH] Small improvement to castvote error caused by ballot setting --- contracts/decide/src/voter.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contracts/decide/src/voter.cpp b/contracts/decide/src/voter.cpp index 39bd34a..b063c55 100644 --- a/contracts/decide/src/voter.cpp +++ b/contracts/decide/src/voter.cpp @@ -159,7 +159,8 @@ ACTION decide::castvote(name voter, name ballot_name, vector options) { check(now >= bal.begin_time && now <= bal.end_time, "vote must occur between ballot begin and end times"); check(options.size() >= bal.min_options, "cannot vote for fewer than min options"); check(options.size() <= bal.max_options, "cannot vote for more than max options"); - check(raw_vote_weight.amount > 0, "must vote with a positive amount"); + // this error can be confusing because it references a very specific ballot setting + check(raw_vote_weight.amount > 0, "must vote with a positive amount, check ballot voting type"); //skip vote tracking if light ballot if (bal.settings.at(name("lightballot"))) {