Fix undefined for maxValue validator in case there is no token selected
This commit is contained in:
parent
6d1a349d87
commit
336413c8e5
|
@ -220,11 +220,12 @@ const SendFunds = ({ initialValues, onClose, onNext, recipientAddress, selectedT
|
||||||
placeholder="Amount*"
|
placeholder="Amount*"
|
||||||
text="Amount*"
|
text="Amount*"
|
||||||
type="text"
|
type="text"
|
||||||
|
disabled={!selectedTokenRecord}
|
||||||
validate={composeValidators(
|
validate={composeValidators(
|
||||||
required,
|
required,
|
||||||
mustBeFloat,
|
mustBeFloat,
|
||||||
greaterThan(0),
|
greaterThan(0),
|
||||||
maxValue(selectedTokenRecord && selectedTokenRecord.balance),
|
maxValue(selectedTokenRecord?.balance),
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
<OnChange name="token">
|
<OnChange name="token">
|
||||||
|
|
Loading…
Reference in New Issue