From c38f239a6c26b87912f22ac0fb93e2f98c78bbf9 Mon Sep 17 00:00:00 2001 From: Apostolof Date: Fri, 15 Jan 2021 17:59:36 +0200 Subject: [PATCH] refactor: remove duplicate contract export, minor particles improvement --- packages/concordia-app/src/assets/particles.js | 2 +- .../concordia-app/src/constants/contracts/ContractNames.js | 2 ++ packages/concordia-app/src/redux/sagas/orbitSaga.js | 7 +++++-- packages/concordia-contracts/index.js | 1 - 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/concordia-app/src/assets/particles.js b/packages/concordia-app/src/assets/particles.js index 1862f6f..d4ce239 100644 --- a/packages/concordia-app/src/assets/particles.js +++ b/packages/concordia-app/src/assets/particles.js @@ -21,7 +21,7 @@ const particlesOptions = { opacity: { anim: { enable: true, - speed: 1.3, + speed: 0.6, opacity_min: 0.05, }, }, diff --git a/packages/concordia-app/src/constants/contracts/ContractNames.js b/packages/concordia-app/src/constants/contracts/ContractNames.js index 95fe6f7..8ddebb5 100644 --- a/packages/concordia-app/src/constants/contracts/ContractNames.js +++ b/packages/concordia-app/src/constants/contracts/ContractNames.js @@ -1 +1,3 @@ export const FORUM_CONTRACT = 'Forum'; +export const POST_VOTING_CONTRACT = 'PostVoting'; +export const VOTING_CONTRACT = 'Voting'; diff --git a/packages/concordia-app/src/redux/sagas/orbitSaga.js b/packages/concordia-app/src/redux/sagas/orbitSaga.js index 749f498..385295b 100644 --- a/packages/concordia-app/src/redux/sagas/orbitSaga.js +++ b/packages/concordia-app/src/redux/sagas/orbitSaga.js @@ -5,8 +5,9 @@ import { import { breezeActions } from '@ezerous/breeze'; import { drizzleActions } from '@ezerous/drizzle'; -import { forumContract } from 'concordia-contracts'; +import { contracts } from 'concordia-contracts'; import { EthereumContractIdentityProvider } from '@ezerous/eth-identity-provider'; +import { FORUM_CONTRACT } from '../../constants/contracts/ContractNames'; function* initOrbitDatabases(action) { const { account, breeze } = action; @@ -23,7 +24,9 @@ function* orbitSaga() { const { drizzle: { web3 } } = res[0]; const networkId = yield call([web3.eth.net, web3.eth.net.getId]); - const contractAddress = forumContract.networks[networkId].address; + const contractAddress = contracts + .find((contract) => contract.contractName === FORUM_CONTRACT) + .networks[networkId].address; EthereumContractIdentityProvider.setContractAddress(contractAddress); EthereumContractIdentityProvider.setWeb3(web3); diff --git a/packages/concordia-contracts/index.js b/packages/concordia-contracts/index.js index bc231ce..b877f71 100644 --- a/packages/concordia-contracts/index.js +++ b/packages/concordia-contracts/index.js @@ -12,5 +12,4 @@ try { module.exports = { contracts: [Forum, Voting, PostVoting], - forumContract: Forum, };