From 336413c8e588c15cb3b9596546afb4d933e4750f Mon Sep 17 00:00:00 2001 From: Agustin Pane Date: Tue, 16 Jun 2020 09:29:12 -0300 Subject: [PATCH] Fix undefined for maxValue validator in case there is no token selected --- .../components/Balances/SendModal/screens/SendFunds/index.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/routes/safe/components/Balances/SendModal/screens/SendFunds/index.tsx b/src/routes/safe/components/Balances/SendModal/screens/SendFunds/index.tsx index eafeea53..1e40a01c 100644 --- a/src/routes/safe/components/Balances/SendModal/screens/SendFunds/index.tsx +++ b/src/routes/safe/components/Balances/SendModal/screens/SendFunds/index.tsx @@ -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), )} />