`RewardByBlock` item only for `Sokol` network
This commit is contained in:
parent
8708bd56b1
commit
1b7ae3e94b
|
@ -2,24 +2,29 @@ import React from 'react'
|
||||||
import { FormInput } from '../FormInput'
|
import { FormInput } from '../FormInput'
|
||||||
import { FormSelect } from '../FormSelect'
|
import { FormSelect } from '../FormSelect'
|
||||||
import { inject, observer } from 'mobx-react'
|
import { inject, observer } from 'mobx-react'
|
||||||
|
import { getNetworkName } from '../../utils/utils'
|
||||||
|
|
||||||
@inject('ballotStore', 'contractsStore')
|
@inject('ballotStore', 'contractsStore')
|
||||||
@observer
|
@observer
|
||||||
export class BallotProxyMetadata extends React.Component {
|
export class BallotProxyMetadata extends React.Component {
|
||||||
render() {
|
render() {
|
||||||
const { ballotStore, networkBranch } = this.props
|
const { ballotStore, contractsStore, networkBranch } = this.props
|
||||||
let options = [
|
let options = [
|
||||||
{ value: '', label: '' },
|
/*0*/ { value: '', label: '' },
|
||||||
{ value: '1', label: ballotStore.ProxyBallotType[1] }, // KeysManager
|
/*1*/ { value: '1', label: ballotStore.ProxyBallotType[1] }, // KeysManager
|
||||||
{ value: '2', label: ballotStore.ProxyBallotType[2] }, // VotingToChangeKeys
|
/*2*/ { value: '2', label: ballotStore.ProxyBallotType[2] }, // VotingToChangeKeys
|
||||||
{ value: '3', label: ballotStore.ProxyBallotType[3] }, // VotingToChangeMinThreshold
|
/*3*/ { value: '3', label: ballotStore.ProxyBallotType[3] }, // VotingToChangeMinThreshold
|
||||||
{ value: '4', label: ballotStore.ProxyBallotType[4] }, // VotingToChangeProxy
|
/*4*/ { value: '4', label: ballotStore.ProxyBallotType[4] }, // VotingToChangeProxy
|
||||||
{ value: '5', label: ballotStore.ProxyBallotType[5] }, // BallotsStorage
|
/*5*/ { value: '5', label: ballotStore.ProxyBallotType[5] }, // BallotsStorage
|
||||||
{ value: '7', label: ballotStore.ProxyBallotType[7] }, // ValidatorMetadata
|
/*6*/ { value: '7', label: ballotStore.ProxyBallotType[7] }, // ValidatorMetadata
|
||||||
{ value: '8', label: ballotStore.ProxyBallotType[8] }, // ProxyStorage
|
/*7*/ { value: '8', label: ballotStore.ProxyBallotType[8] }, // ProxyStorage
|
||||||
{ value: '9', label: ballotStore.ProxyBallotType[9] } // RewardByBlock
|
/*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 (
|
return (
|
||||||
<div className="frm-BallotProxyMetadata">
|
<div className="frm-BallotProxyMetadata">
|
||||||
<div className="frm-BallotProxyMetadata_Row">
|
<div className="frm-BallotProxyMetadata_Row">
|
||||||
|
|
|
@ -64,12 +64,6 @@ constants.NETWORKS = {
|
||||||
BRANCH: 'core',
|
BRANCH: 'core',
|
||||||
TESTNET: false
|
TESTNET: false
|
||||||
},
|
},
|
||||||
'79': {
|
|
||||||
NAME: 'Dai-Test',
|
|
||||||
RPC: 'https://dai-test.poa.network',
|
|
||||||
BRANCH: 'dai-test',
|
|
||||||
TESTNET: true
|
|
||||||
},
|
|
||||||
'100': {
|
'100': {
|
||||||
NAME: 'Dai',
|
NAME: 'Dai',
|
||||||
RPC: 'https://dai.poa.network',
|
RPC: 'https://dai.poa.network',
|
||||||
|
|
Loading…
Reference in New Issue