1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 09:57:02 +01:00

adding condition to check for non-mainnet network and test env (#11007)

This commit is contained in:
Niranjana Binoy 2021-05-07 09:08:24 -04:00 committed by GitHub
parent 2b1e4fb013
commit 580baff97e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 ? (
<Loading />
) : (
@ -144,7 +147,7 @@ export default function ConfirmApprove() {
showModal({
name: 'CUSTOMIZE_GAS',
txData,
hideBasic: isEthGasPrice || noGasPrice,
hideBasic,
}),
)
}