aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/user-preferenced-currency-input/user-preferenced-currency-input.component.js
blob: 6e0e00a1d300e69f86621400460f00d1715cfa52 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import React, { PureComponent } from 'react'
import PropTypes from 'prop-types'
import CurrencyInput from '../currency-input'

export default class UserPreferencedCurrencyInput extends PureComponent {
  static propTypes = {
    useETHAsPrimaryCurrency: PropTypes.bool,
  }

  render () {
    const { useETHAsPrimaryCurrency, ...restProps } = this.props

    return (
      <CurrencyInput
        {...restProps}
        useFiat={!useETHAsPrimaryCurrency}
      />
    )
  }
}