From cce9494663acd88af688b1b720178680778eb17b Mon Sep 17 00:00:00 2001 From: Richard Ramos Date: Wed, 27 Jun 2018 15:10:16 -0400 Subject: [PATCH] Disabling unneded contracts --- app/components/simple-voting/AddPoll.js | 9 +++++++-- config/contracts.json | 6 +++--- 2 files changed, 10 insertions(+), 5 deletions(-) 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"