Unify proptypes in util/proptypes.js (#3728)
* Unify proptypes in util/proptypes.js * Add missing use of nodeOrStringProptype
This commit is contained in:
@@ -15,7 +15,6 @@
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import React, { Component, PropTypes } from 'react';
|
||||
import nullable from '../../../util/nullable-proptype';
|
||||
import BigNumber from 'bignumber.js';
|
||||
import { Checkbox } from 'material-ui';
|
||||
import InfoIcon from 'material-ui/svg-icons/action/info-outline';
|
||||
@@ -24,6 +23,7 @@ import ErrorIcon from 'material-ui/svg-icons/navigation/close';
|
||||
|
||||
import { fromWei } from '~/api/util/wei';
|
||||
import { Form, Input } from '~/ui';
|
||||
import { nullableProptype } from '~/util/proptypes';
|
||||
|
||||
import { termsOfService } from '../../../3rdparty/sms-verification';
|
||||
import styles from './gatherData.css';
|
||||
@@ -32,8 +32,8 @@ export default class GatherData extends Component {
|
||||
static propTypes = {
|
||||
fee: React.PropTypes.instanceOf(BigNumber),
|
||||
isNumberValid: PropTypes.bool.isRequired,
|
||||
isVerified: nullable(PropTypes.bool.isRequired),
|
||||
hasRequested: nullable(PropTypes.bool.isRequired),
|
||||
isVerified: nullableProptype(PropTypes.bool.isRequired),
|
||||
hasRequested: nullableProptype(PropTypes.bool.isRequired),
|
||||
setNumber: PropTypes.func.isRequired,
|
||||
setConsentGiven: PropTypes.func.isRequired
|
||||
}
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import React, { Component, PropTypes } from 'react';
|
||||
import nullable from '../../../util/nullable-proptype';
|
||||
|
||||
import { nullableProptype } from '~/util/proptypes';
|
||||
import TxHash from '~/ui/TxHash';
|
||||
import {
|
||||
POSTING_CONFIRMATION, POSTED_CONFIRMATION
|
||||
@@ -27,7 +27,7 @@ import styles from './sendConfirmation.css';
|
||||
export default class SendConfirmation extends Component {
|
||||
static propTypes = {
|
||||
step: PropTypes.any.isRequired,
|
||||
tx: nullable(PropTypes.any.isRequired)
|
||||
tx: nullableProptype(PropTypes.any.isRequired)
|
||||
}
|
||||
|
||||
render () {
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import React, { Component, PropTypes } from 'react';
|
||||
import nullable from '../../../util/nullable-proptype';
|
||||
|
||||
import { nullableProptype } from '~/util/proptypes';
|
||||
import TxHash from '~/ui/TxHash';
|
||||
import {
|
||||
POSTING_REQUEST, POSTED_REQUEST, REQUESTING_SMS
|
||||
@@ -27,7 +27,7 @@ import styles from './sendRequest.css';
|
||||
export default class SendRequest extends Component {
|
||||
static propTypes = {
|
||||
step: PropTypes.any.isRequired,
|
||||
tx: nullable(PropTypes.any.isRequired)
|
||||
tx: nullableProptype(PropTypes.any.isRequired)
|
||||
}
|
||||
|
||||
render () {
|
||||
|
||||
@@ -17,11 +17,10 @@
|
||||
import BigNumber from 'bignumber.js';
|
||||
import React, { Component, PropTypes } from 'react';
|
||||
import { Checkbox, MenuItem } from 'material-ui';
|
||||
|
||||
import { isEqual } from 'lodash';
|
||||
|
||||
import Form, { Input, InputAddressSelect, AddressSelect, Select } from '~/ui/Form';
|
||||
import nullableProptype from '~/util/nullable-proptype';
|
||||
import { nullableProptype } from '~/util/proptypes';
|
||||
|
||||
import imageUnknown from '../../../../assets/images/contracts/unknown-64x64.png';
|
||||
import styles from '../transfer.css';
|
||||
|
||||
@@ -26,7 +26,7 @@ import NavigationArrowForward from 'material-ui/svg-icons/navigation/arrow-forwa
|
||||
|
||||
import { newError } from '~/ui/Errors/actions';
|
||||
import { BusyStep, CompletedStep, Button, IdentityIcon, Modal, TxHash } from '~/ui';
|
||||
import nullableProptype from '~/util/nullable-proptype';
|
||||
import { nullableProptype } from '~/util/proptypes';
|
||||
|
||||
import Details from './Details';
|
||||
import Extras from './Extras';
|
||||
|
||||
Reference in New Issue
Block a user