fix: wallet send

Not sure how to make this better..at least now it shows you can't send if you have enough balance + the address filled it. It won't show "not enough credits" if you don't have an address - which I think is okay for now.
This commit is contained in:
Thomas Zarebczan 2019-05-10 16:44:01 -04:00
parent 288b8d84df
commit 17648c5181

View file

@ -92,12 +92,12 @@ class WalletSend extends React.PureComponent<Props> {
parseFloat(values.amount) === balance
}
/>
{!!Object.keys(errors).length && (
{!!Object.keys(errors).length || (
<span className="error-text">
{(!!values.address && touched.address && errors.address) ||
(!!values.amount && touched.amount && errors.amount) ||
(values.amount === balance && __('Decrease amount to account for transaction fee')) ||
(values.amount > balance && __('Not enough credits'))}
(parseFloat(values.amount) === balance && __('Decrease amount to account for transaction fee')) ||
(parseFloat(values.amount) > balance && __('Not enough credits'))}
</span>
)}
</div>