From d52d5f59157ab4820607920dc0059977a86a34fb Mon Sep 17 00:00:00 2001 From: Vadim Arasev Date: Wed, 4 Jul 2018 09:47:25 +0300 Subject: [PATCH] (Fix) Minor fixes --- src/components/BallotCard.jsx | 6 ++---- src/components/NewBallot.jsx | 3 +-- src/messages.js | 8 ++++---- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/components/BallotCard.jsx b/src/components/BallotCard.jsx index f6308af..6b4adcd 100644 --- a/src/components/BallotCard.jsx +++ b/src/components/BallotCard.jsx @@ -207,8 +207,7 @@ export class BallotCard extends React.Component { push(`${commonStore.rootPath}`); }); } else { - swal("Warning!", messages.VOTE_FAILED_TX, "warning").then((result) => { - }); + swal("Warning!", messages.VOTE_FAILED_TX, "warning"); } }) .on("error", (e) => { @@ -262,8 +261,7 @@ export class BallotCard extends React.Component { push(`${commonStore.rootPath}`); }); } else { - swal("Warning!", messages.FINALIZE_FAILED_TX, "warning").then((result) => { - }); + swal("Warning!", messages.FINALIZE_FAILED_TX, "warning"); } }) .on("error", (e) => { diff --git a/src/components/NewBallot.jsx b/src/components/NewBallot.jsx index f74595b..7b4cb92 100644 --- a/src/components/NewBallot.jsx +++ b/src/components/NewBallot.jsx @@ -231,8 +231,7 @@ export class NewBallot extends React.Component { push(`${commonStore.rootPath}`); }); } else { - swal("Warning!", messages.BALLOT_CREATE_FAILED_TX, "warning").then((result) => { - }); + swal("Warning!", messages.BALLOT_CREATE_FAILED_TX, "warning"); } }) .on("error", (e) => { diff --git a/src/messages.js b/src/messages.js index d0e5b57..422ba3e 100644 --- a/src/messages.js +++ b/src/messages.js @@ -1,6 +1,6 @@ let messages = {}; messages.invalidVotingKeyMsg = (key) => { - return `The key ${key} is not valid voting Key! Please make sure you have loaded correct voting key in metamask`; + return `The key ${key} is not valid voting Key! Please make sure you have loaded correct voting key in Metamask`; }; messages.VOTED_SUCCESS_MSG = "You successfully voted"; messages.BALLOT_CREATED_SUCCESS_MSG = "You successfully created a new ballot"; @@ -31,11 +31,11 @@ messages.SHOULD_BE_LESS_OR_EQUAL_14_DAYS = (duration) => { return `Ballot end time should not be more than 14 days from now in UTC time. Current duration is ${duration} hours.`; } messages.BALLOT_CREATE_FAILED_TX = `Your transaction was failed. Please make sure you set correct parameters for ballot creation. -Make sure you don't have Transaction Error. Exception thrown in contract code message in metamask before you sign it.` +Make sure you don't have Transaction Error. Exception thrown in contract code message in Metamask before you sign it.` messages.VOTE_FAILED_TX = `Your transaction was failed. Please make sure you haven't already voted for this ballot. -Make sure you don't have Transaction Error. Exception thrown in contract code message in metamask before you sign it.` +Make sure you don't have Transaction Error. Exception thrown in contract code message in Metamask before you sign it.` messages.FINALIZE_FAILED_TX = `Your transaction was failed. Make sure you don't have Transaction Error. -Exception thrown in contract code message in metamask before you sign it.` +Exception thrown in contract code message in Metamask before you sign it.` messages.DESCRIPTION_IS_EMPTY = "Description cannot be empty"; messages.wrongRepo = (repo) => { return `There is no contracts.json in configured repo ${repo}`;