You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
666 B
26 lines
666 B
4 years ago
|
import React, { PureComponent } from 'react';
|
||
|
import PropTypes from 'prop-types';
|
||
|
import TokenInput from '../../ui/token-input';
|
||
6 years ago
|
|
||
|
export default class UserPreferencedTokenInput extends PureComponent {
|
||
|
static propTypes = {
|
||
5 years ago
|
token: PropTypes.shape({
|
||
|
address: PropTypes.string.isRequired,
|
||
|
decimals: PropTypes.number,
|
||
|
symbol: PropTypes.string,
|
||
|
}).isRequired,
|
||
6 years ago
|
useNativeCurrencyAsPrimaryCurrency: PropTypes.bool,
|
||
4 years ago
|
};
|
||
6 years ago
|
|
||
4 years ago
|
render() {
|
||
4 years ago
|
const { useNativeCurrencyAsPrimaryCurrency, ...restProps } = this.props;
|
||
6 years ago
|
|
||
|
return (
|
||
|
<TokenInput
|
||
|
{...restProps}
|
||
6 years ago
|
showFiat={!useNativeCurrencyAsPrimaryCurrency}
|
||
6 years ago
|
/>
|
||
4 years ago
|
);
|
||
6 years ago
|
}
|
||
|
}
|