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',
|
minimumGasLimit = '0x5208',
|
||||||
editGasMode = EDIT_GAS_MODES.MODIFY_IN_PLACE,
|
editGasMode = EDIT_GAS_MODES.MODIFY_IN_PLACE,
|
||||||
) {
|
) {
|
||||||
// eslint-disable-next-line prefer-destructuring
|
|
||||||
const EIP_1559_V2_ENABLED =
|
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';
|
process.env.EIP_1559_V2 === true || process.env.EIP_1559_V2 === 'true';
|
||||||
|
|
||||||
const supportsEIP1559 =
|
const supportsEIP1559 =
|
||||||
|
@ -64,8 +64,7 @@ import GasDetailsItem from './gas-details-item';
|
|||||||
import TransactionAlerts from './transaction-alerts';
|
import TransactionAlerts from './transaction-alerts';
|
||||||
|
|
||||||
// eslint-disable-next-line prefer-destructuring
|
// eslint-disable-next-line prefer-destructuring
|
||||||
const EIP_1559_V2_ENABLED =
|
const EIP_1559_V2_ENABLED = process.env.EIP_1559_V2;
|
||||||
process.env.EIP_1559_V2 === true || process.env.EIP_1559_V2 === 'true';
|
|
||||||
|
|
||||||
const renderHeartBeatIfNotInTest = () =>
|
const renderHeartBeatIfNotInTest = () =>
|
||||||
process.env.IN_TEST ? null : <LoadingHeartBeat />;
|
process.env.IN_TEST ? null : <LoadingHeartBeat />;
|
||||||
|
Loading…
Reference in New Issue
Block a user