mirror of
https://github.com/trezor/trezor-wallet
synced 2025-07-12 01:28:13 +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>
|
</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={
|
value={
|
||||||
calculatingGasLimit
|
calculatingGasLimit
|
||||||
? props.intl.formatMessage(l10nMessages.TR_CALCULATING_DOT_DOT)
|
? props.intl.formatMessage(l10nMessages.TR_CALCULATING_DOT_DOT)
|
||||||
@ -292,7 +300,15 @@ const AdvancedForm = (props: Props) => {
|
|||||||
</Left>
|
</Left>
|
||||||
</InputLabelWrapper>
|
</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}
|
value={gasPrice}
|
||||||
onChange={event => onGasPriceChange(event.target.value)}
|
onChange={event => onGasPriceChange(event.target.value)}
|
||||||
/>
|
/>
|
||||||
@ -323,7 +339,13 @@ const AdvancedForm = (props: Props) => {
|
|||||||
</InputLabelWrapper>
|
</InputLabelWrapper>
|
||||||
}
|
}
|
||||||
state={getDataTextareaState(!!errors.data, !!warnings.data)}
|
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}
|
isDisabled={networkSymbol !== currency}
|
||||||
value={networkSymbol !== currency ? '' : data}
|
value={networkSymbol !== currency ? '' : data}
|
||||||
onChange={event => onDataChange(event.target.value)}
|
onChange={event => onDataChange(event.target.value)}
|
||||||
|
@ -355,9 +355,9 @@ const AccountSend = (props: Props) => {
|
|||||||
topLabel={props.intl.formatMessage(l10nCommonMessages.TR_ADDRESS)}
|
topLabel={props.intl.formatMessage(l10nCommonMessages.TR_ADDRESS)}
|
||||||
bottomText={
|
bottomText={
|
||||||
<>
|
<>
|
||||||
{errors.address && <FormattedMessage {...errors.address} />}
|
{(errors.address && <FormattedMessage {...errors.address} />) ||
|
||||||
{warnings.address && <FormattedMessage {...warnings.address} />}
|
(warnings.address && <FormattedMessage {...warnings.address} />) ||
|
||||||
{infos.address && <FormattedMessage {...infos.address} />}
|
(infos.address && <FormattedMessage {...infos.address} />)}
|
||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
value={address}
|
value={address}
|
||||||
@ -399,9 +399,9 @@ const AccountSend = (props: Props) => {
|
|||||||
onChange={event => onAmountChange(event.target.value)}
|
onChange={event => onAmountChange(event.target.value)}
|
||||||
bottomText={
|
bottomText={
|
||||||
<>
|
<>
|
||||||
{errors.amount && <FormattedMessage {...errors.amount} />}
|
{(errors.amount && <FormattedMessage {...errors.amount} />) ||
|
||||||
{warnings.amount && <FormattedMessage {...warnings.amount} />}
|
(warnings.amount && <FormattedMessage {...warnings.amount} />) ||
|
||||||
{infos.amount && <FormattedMessage {...infos.amount} />}
|
(infos.amount && <FormattedMessage {...infos.amount} />)}
|
||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
sideAddons={[
|
sideAddons={[
|
||||||
|
Loading…
Reference in New Issue
Block a user