mirror of
https://github.com/trezor/trezor-wallet
synced 2025-01-22 14:00:58 +00:00
use formatMessage() on gas price input value
This commit is contained in:
parent
dd99ab69d3
commit
2111f86077
@ -3,7 +3,7 @@
|
||||
import * as React from 'react';
|
||||
import styled from 'styled-components';
|
||||
import colors from 'config/colors';
|
||||
import { FormattedMessage } from 'react-intl';
|
||||
import { FormattedMessage, injectIntl } from 'react-intl';
|
||||
|
||||
import Link from 'components/Link';
|
||||
import Input from 'components/inputs/Input';
|
||||
@ -18,6 +18,7 @@ import l10nMessages from './index.messages';
|
||||
import type { Props as BaseProps } from '../../Container';
|
||||
|
||||
type Props = BaseProps & {
|
||||
intl: any,
|
||||
children: React.Node,
|
||||
}
|
||||
|
||||
@ -212,7 +213,7 @@ const AdvancedForm = (props: Props) => {
|
||||
</InputLabelWrapper>
|
||||
)}
|
||||
bottomText={errors.gasLimit || warnings.gasLimit || infos.gasLimit}
|
||||
value={calculatingGasLimit ? 'Calculating...' : gasLimit} // TODO: figure out translations in inputs
|
||||
value={calculatingGasLimit ? props.intl.formatMessage(l10nMessages.TR_CALCULATING_DOT_DOT) : gasLimit} // TODO: figure out translations in inputs
|
||||
isDisabled={networkSymbol === currency && data.length > 0}
|
||||
onChange={event => onGasLimitChange(event.target.value)}
|
||||
/>
|
||||
@ -289,4 +290,4 @@ const AdvancedForm = (props: Props) => {
|
||||
);
|
||||
};
|
||||
|
||||
export default AdvancedForm;
|
||||
export default injectIntl(AdvancedForm);
|
@ -22,6 +22,7 @@ const definedMessages: Messages = defineMessages({
|
||||
TR_CALCULATING_DOT_DOT: {
|
||||
id: 'TR_CALCULATING_DOT_DOT',
|
||||
defaultMessage: 'Calculating...',
|
||||
description: 'Used when calculating gas limit based on data input in ethereum advanced send form',
|
||||
},
|
||||
TR_GAS_PRICE: {
|
||||
id: 'TR_GAS_PRICE',
|
||||
|
Loading…
Reference in New Issue
Block a user