From e906bd8d0e09e4d0ca76241d7769dd6d262fe667 Mon Sep 17 00:00:00 2001 From: Niranjana Binoy <43930900+NiranjanaBinoy@users.noreply.github.com> Date: Fri, 7 May 2021 09:08:24 -0400 Subject: [PATCH] adding condition to check for non-mainnet network and test env (#11007) --- ui/pages/confirm-approve/confirm-approve.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ui/pages/confirm-approve/confirm-approve.js b/ui/pages/confirm-approve/confirm-approve.js index b7731e752..a0257e7a4 100644 --- a/ui/pages/confirm-approve/confirm-approve.js +++ b/ui/pages/confirm-approve/confirm-approve.js @@ -26,6 +26,7 @@ import { getNextSuggestedNonce, getNoGasPriceFetched, getIsEthGasPriceFetched, + getIsMainnet, } from '../../selectors'; import { currentNetworkTxListSelector } from '../../selectors/transactions'; import Loading from '../../components/ui/loading-screen'; @@ -120,7 +121,9 @@ export default function ConfirmApprove() { : null; const isEthGasPrice = useSelector(getIsEthGasPriceFetched); const noGasPrice = useSelector(getNoGasPriceFetched); - + const isMainnet = useSelector(getIsMainnet); + const hideBasic = + isEthGasPrice || noGasPrice || !(isMainnet || process.env.IN_TEST); return tokenSymbol === undefined ? ( ) : ( @@ -144,7 +147,7 @@ export default function ConfirmApprove() { showModal({ name: 'CUSTOMIZE_GAS', txData, - hideBasic: isEthGasPrice || noGasPrice, + hideBasic, }), ) }