`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 { 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 (
|
||||
<div className="frm-BallotProxyMetadata">
|
||||
<div className="frm-BallotProxyMetadata_Row">
|
||||
|
|
|
@ -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',
|
||||
|
|
Loading…
Reference in New Issue