aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/user-preferenced-token-input/user-preferenced-token-input.component.js
blob: 8f14231ac8ccf4d4f50a66dc7bd8f832d26320cf (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 TokenInput from '../token-input'

export default class UserPreferencedTokenInput extends PureComponent {
  static propTypes = {
    useNativeCurrencyAsPrimaryCurrency: PropTypes.bool,
  }

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

    return (
      <TokenInput
        {...restProps}
        showFiat={!useNativeCurrencyAsPrimaryCurrency}
      />
    )
  }
}