diff --git a/src/components/BallotProxyMetadata/index.js b/src/components/BallotProxyMetadata/index.js index e0d0c01..9c7e6e4 100644 --- a/src/components/BallotProxyMetadata/index.js +++ b/src/components/BallotProxyMetadata/index.js @@ -2,24 +2,29 @@ import React from 'react' import { FormInput } from '../FormInput' import { FormSelect } from '../FormSelect' import { inject, observer } from 'mobx-react' +import { getNetworkName } from '../../utils/utils' @inject('ballotStore', 'contractsStore') @observer export class BallotProxyMetadata extends React.Component { render() { - const { ballotStore, networkBranch } = this.props + const { ballotStore, contractsStore, networkBranch } = this.props let options = [ - { value: '', label: '' }, - { value: '1', label: ballotStore.ProxyBallotType[1] }, // KeysManager - { value: '2', label: ballotStore.ProxyBallotType[2] }, // VotingToChangeKeys - { value: '3', label: ballotStore.ProxyBallotType[3] }, // VotingToChangeMinThreshold - { value: '4', label: ballotStore.ProxyBallotType[4] }, // VotingToChangeProxy - { value: '5', label: ballotStore.ProxyBallotType[5] }, // BallotsStorage - { value: '7', label: ballotStore.ProxyBallotType[7] }, // ValidatorMetadata - { value: '8', label: ballotStore.ProxyBallotType[8] }, // ProxyStorage - { value: '9', label: ballotStore.ProxyBallotType[9] } // RewardByBlock + /*0*/ { value: '', label: '' }, + /*1*/ { value: '1', label: ballotStore.ProxyBallotType[1] }, // KeysManager + /*2*/ { value: '2', label: ballotStore.ProxyBallotType[2] }, // VotingToChangeKeys + /*3*/ { value: '3', label: ballotStore.ProxyBallotType[3] }, // VotingToChangeMinThreshold + /*4*/ { value: '4', label: ballotStore.ProxyBallotType[4] }, // VotingToChangeProxy + /*5*/ { value: '5', label: ballotStore.ProxyBallotType[5] }, // BallotsStorage + /*6*/ { value: '7', label: ballotStore.ProxyBallotType[7] }, // ValidatorMetadata + /*7*/ { value: '8', label: ballotStore.ProxyBallotType[8] }, // ProxyStorage + /*8*/ { value: '9', label: ballotStore.ProxyBallotType[9] } // RewardByBlock ] + if (getNetworkName(contractsStore.netId).toLowerCase() != 'sokol') { + options.splice(8) // keep 0-7 items and remove 8th if the network is not Sokol + } + return (
diff --git a/src/utils/constants.js b/src/utils/constants.js index 8778580..50fbfe5 100644 --- a/src/utils/constants.js +++ b/src/utils/constants.js @@ -64,12 +64,6 @@ constants.NETWORKS = { BRANCH: 'core', TESTNET: false }, - '79': { - NAME: 'Dai-Test', - RPC: 'https://dai-test.poa.network', - BRANCH: 'dai-test', - TESTNET: true - }, '100': { NAME: 'Dai', RPC: 'https://dai.poa.network',