New ballot creation fix for affected key
This commit is contained in:
parent
f6f5b09d39
commit
1d6d6fabb0
|
@ -16,14 +16,16 @@ function addBallot(api, func, ballotViewObj, address, contractAddr, cb) {
|
|||
|
||||
if (ballotViewObj.miningKey.indexOf("0x") > -1)
|
||||
ballotViewObj.miningKey = ballotViewObj.miningKey.substr(2);
|
||||
|
||||
ballotViewObj.miningKey = ballotViewObj.miningKey.toLowerCase();
|
||||
|
||||
if (ballotViewObj.owner.indexOf("0x") > -1)
|
||||
ballotViewObj.owner = ballotViewObj.owner.substr(2);
|
||||
|
||||
ballotViewObj.owner = ballotViewObj.owner.toLowerCase();
|
||||
|
||||
if (ballotViewObj.affectedKey.indexOf("0x") > -1)
|
||||
ballotViewObj.affectedKey = ballotViewObj.affectedKey.substr(2);
|
||||
ballotViewObj.affectedKey = ballotViewObj.affectedKey.toLowerCase();
|
||||
|
||||
ballotViewObj.addAction = JSON.parse(ballotViewObj.addAction);
|
||||
|
||||
var memoHex = "0x" + toUnifiedLengthRight(toHexString(toUTF8Array(ballotViewObj.memo)));
|
||||
|
@ -1033,7 +1035,7 @@ $(function() {
|
|||
function(txHash, err) {
|
||||
if (err) {
|
||||
$(".loading-container").hide();
|
||||
showAlert(err, "You are already voted");
|
||||
showAlert(err, "You are already voted or have no rights to vote");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -9,14 +9,16 @@ function addBallot(api, func, ballotViewObj, address, contractAddr, cb) {
|
|||
|
||||
if (ballotViewObj.miningKey.indexOf("0x") > -1)
|
||||
ballotViewObj.miningKey = ballotViewObj.miningKey.substr(2);
|
||||
|
||||
ballotViewObj.miningKey = ballotViewObj.miningKey.toLowerCase();
|
||||
|
||||
if (ballotViewObj.owner.indexOf("0x") > -1)
|
||||
ballotViewObj.owner = ballotViewObj.owner.substr(2);
|
||||
|
||||
ballotViewObj.owner = ballotViewObj.owner.toLowerCase();
|
||||
|
||||
if (ballotViewObj.affectedKey.indexOf("0x") > -1)
|
||||
ballotViewObj.affectedKey = ballotViewObj.affectedKey.substr(2);
|
||||
ballotViewObj.affectedKey = ballotViewObj.affectedKey.toLowerCase();
|
||||
|
||||
ballotViewObj.addAction = JSON.parse(ballotViewObj.addAction);
|
||||
|
||||
var memoHex = "0x" + toUnifiedLengthRight(toHexString(toUTF8Array(ballotViewObj.memo)));
|
||||
|
|
|
@ -210,7 +210,7 @@ $(function() {
|
|||
function(txHash, err) {
|
||||
if (err) {
|
||||
$(".loading-container").hide();
|
||||
showAlert(err, "You are already voted");
|
||||
showAlert(err, "You are already voted or have no rights to vote");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue