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*"
|
||||
text="Amount*"
|
||||
type="text"
|
||||
disabled={!selectedTokenRecord}
|
||||
validate={composeValidators(
|
||||
required,
|
||||
mustBeFloat,
|
||||
greaterThan(0),
|
||||
maxValue(selectedTokenRecord && selectedTokenRecord.balance),
|
||||
maxValue(selectedTokenRecord?.balance),
|
||||
)}
|
||||
/>
|
||||
<OnChange name="token">
|
||||
|
|
Loading…
Reference in New Issue