From 3c7d680a9ff0abf2b6d0121a87f552ce8b3cd8c8 Mon Sep 17 00:00:00 2001 From: Milan Date: Mon, 20 Jul 2020 19:12:01 +0200 Subject: [PATCH] feat: fixed validation error --- .../src/modals/SimpleBuy/EnterAmount/Checkout/validation.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/blockchain-wallet-v4-frontend/src/modals/SimpleBuy/EnterAmount/Checkout/validation.tsx b/packages/blockchain-wallet-v4-frontend/src/modals/SimpleBuy/EnterAmount/Checkout/validation.tsx index 67378cfd69d..ab7a2f26f0a 100644 --- a/packages/blockchain-wallet-v4-frontend/src/modals/SimpleBuy/EnterAmount/Checkout/validation.tsx +++ b/packages/blockchain-wallet-v4-frontend/src/modals/SimpleBuy/EnterAmount/Checkout/validation.tsx @@ -42,7 +42,7 @@ export const maximumAmount = ( const { pair, method } = restProps if (!method) return true - return Number(value) > Number(getMaxMin(pair, 'max', allValues)) + return Number(value) > Number(getMaxMin(pair, 'max', allValues, method)) ? 'ABOVE_MAX' : false } @@ -57,7 +57,7 @@ export const minimumAmount = ( const { pair, method } = restProps if (!method) return true - return Number(value) < Number(getMaxMin(pair, 'min', allValues)) + return Number(value) < Number(getMaxMin(pair, 'min', allValues, method)) ? 'BELOW_MIN' : false }