diff --git a/app/components/simple-voting/PollsList.js b/app/components/simple-voting/PollsList.js
index 4e28ac4..a1d5b09 100644
--- a/app/components/simple-voting/PollsList.js
+++ b/app/components/simple-voting/PollsList.js
@@ -65,7 +65,8 @@ class Poll extends PureComponent {
return updatePoll(idPoll);
})
.catch(res => {
- console.log('fail:', res);
+ console.log('fail:', res, res.messsage);
+ this.setState({ error: res.message })
})
.finally(() => {
this.getBalance();
@@ -111,7 +112,7 @@ class Poll extends PureComponent {
balance,
classes
} = this.props;
- const { value, originalValue, isSubmitting } = this.state;
+ const { value, originalValue, isSubmitting, error } = this.state;
const cantVote = balance == 0 || !_canVote;
const disableVote = cantVote || isSubmitting;
const { fromWei } = web3.utils;
@@ -131,6 +132,7 @@ class Poll extends PureComponent {
{balance == 0 && You can not vote because your account had no SNT when this poll was created}
{balance != 0 && !_canVote && You can not vote on this poll}
}
+ {error && {error}}
{!cantVote &&