diff --git a/app/components/simple-voting/AddPoll.js b/app/components/simple-voting/AddPoll.js index f5f9c74..f6ee772 100644 --- a/app/components/simple-voting/AddPoll.js +++ b/app/components/simple-voting/AddPoll.js @@ -104,8 +104,10 @@ const AddPoll = withFormik({ const { addPoll } = PollManager.methods; const currentBlock = await getBlockNumber(); const endTime = currentBlock + (oneDayinBlocks * 90); - const toSend = addPoll(endTime, singleChoiceDef(description, ['YES'])); + + setSubmitting(true); + toSend.estimateGas() .then(gasEstimated => { console.log("addPoll gas estimated: "+gasEstimated); @@ -116,7 +118,10 @@ const AddPoll = withFormik({ }) .catch(res => { console.log('fail:', res); - }); + }) + .finally(() => { + setSubmitting(false); + }) } })(StyledForm) diff --git a/config/contracts.json b/config/contracts.json index 589928d..34d216f 100644 --- a/config/contracts.json +++ b/config/contracts.json @@ -24,13 +24,13 @@ "deploy": false }, "DelegationProxyFactory": { - "deploy": true + "deploy": false }, "ProposalManager": { "deploy": false }, "TrustNetwork": { - "deploy": true, + "deploy": false, "args": ["$DelegationProxyFactory"] }, "Factory": { @@ -72,7 +72,7 @@ "args": ["$SNT", "$TrustNetwork"] }, "Democracy": { - "deploy": true, + "deploy": false, "args": [ "$SNT", "$DelegationProxyFactory"