mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
adding condition to check for non-mainnet network and test env (#11007)
This commit is contained in:
parent
640c6d98d3
commit
e906bd8d0e
@ -26,6 +26,7 @@ import {
|
|||||||
getNextSuggestedNonce,
|
getNextSuggestedNonce,
|
||||||
getNoGasPriceFetched,
|
getNoGasPriceFetched,
|
||||||
getIsEthGasPriceFetched,
|
getIsEthGasPriceFetched,
|
||||||
|
getIsMainnet,
|
||||||
} from '../../selectors';
|
} from '../../selectors';
|
||||||
import { currentNetworkTxListSelector } from '../../selectors/transactions';
|
import { currentNetworkTxListSelector } from '../../selectors/transactions';
|
||||||
import Loading from '../../components/ui/loading-screen';
|
import Loading from '../../components/ui/loading-screen';
|
||||||
@ -120,7 +121,9 @@ export default function ConfirmApprove() {
|
|||||||
: null;
|
: null;
|
||||||
const isEthGasPrice = useSelector(getIsEthGasPriceFetched);
|
const isEthGasPrice = useSelector(getIsEthGasPriceFetched);
|
||||||
const noGasPrice = useSelector(getNoGasPriceFetched);
|
const noGasPrice = useSelector(getNoGasPriceFetched);
|
||||||
|
const isMainnet = useSelector(getIsMainnet);
|
||||||
|
const hideBasic =
|
||||||
|
isEthGasPrice || noGasPrice || !(isMainnet || process.env.IN_TEST);
|
||||||
return tokenSymbol === undefined ? (
|
return tokenSymbol === undefined ? (
|
||||||
<Loading />
|
<Loading />
|
||||||
) : (
|
) : (
|
||||||
@ -144,7 +147,7 @@ export default function ConfirmApprove() {
|
|||||||
showModal({
|
showModal({
|
||||||
name: 'CUSTOMIZE_GAS',
|
name: 'CUSTOMIZE_GAS',
|
||||||
txData,
|
txData,
|
||||||
hideBasic: isEthGasPrice || noGasPrice,
|
hideBasic,
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user