Browse Source

refactor: remove duplicate contract export, minor particles improvement

develop
Apostolos Fanakis 4 years ago
parent
commit
c38f239a6c
  1. 2
      packages/concordia-app/src/assets/particles.js
  2. 2
      packages/concordia-app/src/constants/contracts/ContractNames.js
  3. 7
      packages/concordia-app/src/redux/sagas/orbitSaga.js
  4. 1
      packages/concordia-contracts/index.js

2
packages/concordia-app/src/assets/particles.js

@ -21,7 +21,7 @@ const particlesOptions = {
opacity: { opacity: {
anim: { anim: {
enable: true, enable: true,
speed: 1.3, speed: 0.6,
opacity_min: 0.05, opacity_min: 0.05,
}, },
}, },

2
packages/concordia-app/src/constants/contracts/ContractNames.js

@ -1 +1,3 @@
export const FORUM_CONTRACT = 'Forum'; export const FORUM_CONTRACT = 'Forum';
export const POST_VOTING_CONTRACT = 'PostVoting';
export const VOTING_CONTRACT = 'Voting';

7
packages/concordia-app/src/redux/sagas/orbitSaga.js

@ -5,8 +5,9 @@ import {
import { breezeActions } from '@ezerous/breeze'; import { breezeActions } from '@ezerous/breeze';
import { drizzleActions } from '@ezerous/drizzle'; import { drizzleActions } from '@ezerous/drizzle';
import { forumContract } from 'concordia-contracts'; import { contracts } from 'concordia-contracts';
import { EthereumContractIdentityProvider } from '@ezerous/eth-identity-provider'; import { EthereumContractIdentityProvider } from '@ezerous/eth-identity-provider';
import { FORUM_CONTRACT } from '../../constants/contracts/ContractNames';
function* initOrbitDatabases(action) { function* initOrbitDatabases(action) {
const { account, breeze } = action; const { account, breeze } = action;
@ -23,7 +24,9 @@ function* orbitSaga() {
const { drizzle: { web3 } } = res[0]; const { drizzle: { web3 } } = res[0];
const networkId = yield call([web3.eth.net, web3.eth.net.getId]); 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.setContractAddress(contractAddress);
EthereumContractIdentityProvider.setWeb3(web3); EthereumContractIdentityProvider.setWeb3(web3);

1
packages/concordia-contracts/index.js

@ -12,5 +12,4 @@ try {
module.exports = { module.exports = {
contracts: [Forum, Voting, PostVoting], contracts: [Forum, Voting, PostVoting],
forumContract: Forum,
}; };

Loading…
Cancel
Save