mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 01:39:44 +01:00
Remove redundant EIP_1559_V2_ENABLED
comparison (#12954)
A redundant comparison for the `EIP_1559_V2_ENABLED` variable has been removed. This variable is a boolean, so it can be treated as a boolean directly in most cases. One such comparison has been preserved for the purpose of allowing unit testing, because `process.env` entries are always strings in Node.js. A comment was added to explain this.
This commit is contained in:
parent
6d34d85f6e
commit
b75ef5f0eb
@ -74,8 +74,8 @@ export function useGasFeeInputs(
|
||||
minimumGasLimit = '0x5208',
|
||||
editGasMode = EDIT_GAS_MODES.MODIFY_IN_PLACE,
|
||||
) {
|
||||
// eslint-disable-next-line prefer-destructuring
|
||||
const EIP_1559_V2_ENABLED =
|
||||
// This is a string in unit tests but is a boolean in the browser
|
||||
process.env.EIP_1559_V2 === true || process.env.EIP_1559_V2 === 'true';
|
||||
|
||||
const supportsEIP1559 =
|
||||
|
@ -64,8 +64,7 @@ import GasDetailsItem from './gas-details-item';
|
||||
import TransactionAlerts from './transaction-alerts';
|
||||
|
||||
// eslint-disable-next-line prefer-destructuring
|
||||
const EIP_1559_V2_ENABLED =
|
||||
process.env.EIP_1559_V2 === true || process.env.EIP_1559_V2 === 'true';
|
||||
const EIP_1559_V2_ENABLED = process.env.EIP_1559_V2;
|
||||
|
||||
const renderHeartBeatIfNotInTest = () =>
|
||||
process.env.IN_TEST ? null : <LoadingHeartBeat />;
|
||||
|
Loading…
Reference in New Issue
Block a user