mirror of
https://github.com/trezor/trezor-wallet
synced 2025-02-16 01:52:00 +00:00
fix rendering of validation error for advanced send eth
This commit is contained in:
parent
934df38064
commit
b58cff72ff
@ -234,7 +234,15 @@ const AdvancedForm = (props: Props) => {
|
||||
)}
|
||||
</InputLabelWrapper>
|
||||
}
|
||||
bottomText={errors.gasLimit || warnings.gasLimit || infos.gasLimit}
|
||||
bottomText={
|
||||
<>
|
||||
{(errors.gasLimit && <FormattedMessage {...errors.gasLimit} />) ||
|
||||
(warnings.gasLimit && (
|
||||
<FormattedMessage {...warnings.gasLimit} />
|
||||
)) ||
|
||||
(infos.gasLimit && <FormattedMessage {...infos.gasLimit} />)}
|
||||
</>
|
||||
}
|
||||
value={
|
||||
calculatingGasLimit
|
||||
? props.intl.formatMessage(l10nMessages.TR_CALCULATING_DOT_DOT)
|
||||
@ -292,7 +300,15 @@ const AdvancedForm = (props: Props) => {
|
||||
</Left>
|
||||
</InputLabelWrapper>
|
||||
}
|
||||
bottomText={errors.gasPrice || warnings.gasPrice || infos.gasPrice}
|
||||
bottomText={
|
||||
<>
|
||||
{(errors.gasPrice && <FormattedMessage {...errors.gasPrice} />) ||
|
||||
(warnings.gasPrice && (
|
||||
<FormattedMessage {...warnings.gasPrice} />
|
||||
)) ||
|
||||
(infos.v && <FormattedMessage {...infos.gasPrice} />)}
|
||||
</>
|
||||
}
|
||||
value={gasPrice}
|
||||
onChange={event => onGasPriceChange(event.target.value)}
|
||||
/>
|
||||
@ -323,7 +339,13 @@ const AdvancedForm = (props: Props) => {
|
||||
</InputLabelWrapper>
|
||||
}
|
||||
state={getDataTextareaState(!!errors.data, !!warnings.data)}
|
||||
bottomText={errors.data || warnings.data || infos.data}
|
||||
bottomText={
|
||||
<>
|
||||
{(errors.data && <FormattedMessage {...errors.data} />) ||
|
||||
(warnings.data && <FormattedMessage {...warnings.data} />) ||
|
||||
(infos.data && <FormattedMessage {...infos.data} />)}
|
||||
</>
|
||||
}
|
||||
isDisabled={networkSymbol !== currency}
|
||||
value={networkSymbol !== currency ? '' : data}
|
||||
onChange={event => onDataChange(event.target.value)}
|
||||
|
@ -355,9 +355,9 @@ const AccountSend = (props: Props) => {
|
||||
topLabel={props.intl.formatMessage(l10nCommonMessages.TR_ADDRESS)}
|
||||
bottomText={
|
||||
<>
|
||||
{errors.address && <FormattedMessage {...errors.address} />}
|
||||
{warnings.address && <FormattedMessage {...warnings.address} />}
|
||||
{infos.address && <FormattedMessage {...infos.address} />}
|
||||
{(errors.address && <FormattedMessage {...errors.address} />) ||
|
||||
(warnings.address && <FormattedMessage {...warnings.address} />) ||
|
||||
(infos.address && <FormattedMessage {...infos.address} />)}
|
||||
</>
|
||||
}
|
||||
value={address}
|
||||
@ -399,9 +399,9 @@ const AccountSend = (props: Props) => {
|
||||
onChange={event => onAmountChange(event.target.value)}
|
||||
bottomText={
|
||||
<>
|
||||
{errors.amount && <FormattedMessage {...errors.amount} />}
|
||||
{warnings.amount && <FormattedMessage {...warnings.amount} />}
|
||||
{infos.amount && <FormattedMessage {...infos.amount} />}
|
||||
{(errors.amount && <FormattedMessage {...errors.amount} />) ||
|
||||
(warnings.amount && <FormattedMessage {...warnings.amount} />) ||
|
||||
(infos.amount && <FormattedMessage {...infos.amount} />)}
|
||||
</>
|
||||
}
|
||||
sideAddons={[
|
||||
|
Loading…
Reference in New Issue
Block a user