diff --git a/app/components/flow/PollVoting.js b/app/components/flow/PollVoting.js index 687e33a..64718e5 100644 --- a/app/components/flow/PollVoting.js +++ b/app/components/flow/PollVoting.js @@ -95,7 +95,7 @@ class PollVoting extends Component { const balance = fromWei(balances[0].tokenBalance, "ether"); const cantVote = balance == 0 || !poll._canVote; const availableCredits = parseInt(balance, 10) - votes.reduce((prev, curr) => prev + curr * curr, 0); - const disableVote = cantVote || availableCredits == parseInt(balance, 10); + const disableVote = cantVote || availableCredits == parseInt(balance, 10) || arraysEqual(votes, originalVotes.slice(0, votes.length)); // Votes calculation const originalVotesQty = originalVotes.reduce((x,y) => x+y, 0); diff --git a/app/components/flow/Results.js b/app/components/flow/Results.js index f6ae662..4bfe163 100644 --- a/app/components/flow/Results.js +++ b/app/components/flow/Results.js @@ -42,7 +42,7 @@ class Results extends Component { render(){ const {polls} = this.props; - const {isError, poll} = this.state; + let {isError, poll} = this.state; const title = polls[0].content.title; const ballots = polls[0].content.ballots; @@ -52,11 +52,12 @@ class Results extends Component { } return
- { isError &&
+ { isError &&
+
Transaction failed Copy with apologies and invitation to try again - +
} { !isError &&
diff --git a/app/css/styles.css b/app/css/styles.css index f181c85..42e0373 100644 --- a/app/css/styles.css +++ b/app/css/styles.css @@ -290,4 +290,22 @@ button:disabled, button[disabled]{ opacity: .5; -} \ No newline at end of file +} + +.errorTrx { + text-align: center; + padding-top: 100px; +} + +.errorTrx div.image { + padding: 20px 11px 7px 11px; + border-radius: 50%; + background: #ffe8ec; + display: inline; +} + +.errorTrx h1, +.errorTrx p { + margin-bottom: 15px; +} + diff --git a/app/images/sad-face.svg b/app/images/sad-face.svg new file mode 100644 index 0000000..3bde4fd --- /dev/null +++ b/app/images/sad-face.svg @@ -0,0 +1,4 @@ + + + +