commit
1ff1a04ef4
|
@ -187,11 +187,16 @@ export class NewBallot extends React.Component {
|
||||||
}
|
}
|
||||||
let curDateInSeconds = moment.utc().add(5, 'minute').unix();
|
let curDateInSeconds = moment.utc().add(5, 'minute').unix();
|
||||||
methodToCreateBallot(curDateInSeconds)
|
methodToCreateBallot(curDateInSeconds)
|
||||||
.on("receipt", () => {
|
.on("receipt", (tx) => {
|
||||||
commonStore.hideLoading();
|
commonStore.hideLoading();
|
||||||
swal("Congratulations!", messages.BALLOT_CREATED_SUCCESS_MSG, "success").then((result) => {
|
if(tx.status === '0x1'){
|
||||||
push(`${commonStore.rootPath}`);
|
swal("Congratulations!", messages.BALLOT_CREATED_SUCCESS_MSG, "success").then((result) => {
|
||||||
});
|
push(`${commonStore.rootPath}`);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
swal("Warning!", messages.FAILED_TX, "warning").then((result) => {
|
||||||
|
});
|
||||||
|
}
|
||||||
})
|
})
|
||||||
.on("error", (e) => {
|
.on("error", (e) => {
|
||||||
commonStore.hideLoading();
|
commonStore.hideLoading();
|
||||||
|
|
|
@ -26,6 +26,8 @@ messages.SHOULD_BE_MORE_THAN_TWO_DAYS = (duration, neededHours, neededMinutes) =
|
||||||
Please add ${neededHours} hours and ${neededMinutes} minutes in order to set correct end time
|
Please add ${neededHours} hours and ${neededMinutes} minutes in order to set correct end time
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
messages.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.`
|
||||||
messages.DESCRIPTION_IS_EMPTY = "Description cannot be empty";
|
messages.DESCRIPTION_IS_EMPTY = "Description cannot be empty";
|
||||||
module.exports = {
|
module.exports = {
|
||||||
messages
|
messages
|
||||||
|
|
Loading…
Reference in New Issue