- {isMultiLayerFeeNetwork ? (
+ {hasLayer1GasFee ? (
{
const hardwareWalletRequiresConnection =
doesAddressRequireLedgerHidConnection(state, fromAddress);
- const isMultiLayerFeeNetwork = getIsMultiLayerFeeNetwork(state);
const isUsingPaymaster = getIsUsingPaymaster(state);
let isSigningOrSubmitting = Boolean(
@@ -327,7 +325,6 @@ const mapStateToProps = (state, ownProps) => {
showLedgerSteps: fromAddressIsLedger,
nativeCurrency,
hardwareWalletRequiresConnection,
- isMultiLayerFeeNetwork,
chainId,
isBuyableChain,
useCurrencyRateCheck: getUseCurrencyRateCheck(state),
diff --git a/ui/pages/confirmations/confirm-transaction-base/confirm-transaction-base.test.js b/ui/pages/confirmations/confirm-transaction-base/confirm-transaction-base.test.js
index 2a29003e4b16..8064e88ae3a8 100644
--- a/ui/pages/confirmations/confirm-transaction-base/confirm-transaction-base.test.js
+++ b/ui/pages/confirmations/confirm-transaction-base/confirm-transaction-base.test.js
@@ -346,6 +346,7 @@ describe('Confirm Transaction Base', () => {
txData: {
...baseStore.confirmTransaction.txData,
chainId: CHAIN_IDS.OPTIMISM,
+ layer1GasFee: '0x1',
},
},
};
diff --git a/ui/pages/confirmations/send/send-content/send-content.component.js b/ui/pages/confirmations/send/send-content/send-content.component.js
index bbf70d28071d..97340b404db3 100644
--- a/ui/pages/confirmations/send/send-content/send-content.component.js
+++ b/ui/pages/confirmations/send/send-content/send-content.component.js
@@ -34,7 +34,7 @@ export default class SendContent extends Component {
recipient: PropTypes.object,
acknowledgeRecipientWarning: PropTypes.func,
recipientWarningAcknowledged: PropTypes.bool,
- isMultiLayerFeeNetwork: PropTypes.bool,
+ hasLayer1GasFee: PropTypes.bool,
};
render() {
@@ -49,7 +49,7 @@ export default class SendContent extends Component {
assetError,
recipient,
recipientWarningAcknowledged,
- isMultiLayerFeeNetwork,
+ hasLayer1GasFee,
} = this.props;
let gasError;
@@ -82,7 +82,7 @@ export default class SendContent extends Component {
{networkOrAccountNotSupports1559 ? : null}
{showHexData ? : null}
- {!isMultiLayerFeeNetwork && }
+ {!hasLayer1GasFee && }
);
diff --git a/ui/pages/confirmations/send/send-content/send-content.container.js b/ui/pages/confirmations/send/send-content/send-content.container.js
index f944e1677e4c..72d25deb333b 100644
--- a/ui/pages/confirmations/send/send-content/send-content.container.js
+++ b/ui/pages/confirmations/send/send-content/send-content.container.js
@@ -3,7 +3,6 @@ import {
getIsEthGasPriceFetched,
getNoGasPriceFetched,
checkNetworkOrAccountNotSupports1559,
- getIsMultiLayerFeeNetwork,
} from '../../../../selectors';
import {
getIsBalanceInsufficient,
@@ -12,6 +11,7 @@ import {
getRecipient,
acknowledgeRecipientWarning,
getRecipientWarningAcknowledgement,
+ hasSendLayer1GasFee,
} from '../../../../ducks/send';
import SendContent from './send-content.component';
@@ -30,7 +30,7 @@ function mapStateToProps(state) {
assetError: getAssetError(state),
recipient,
recipientWarningAcknowledged,
- isMultiLayerFeeNetwork: getIsMultiLayerFeeNetwork(state),
+ hasLayer1GasFee: hasSendLayer1GasFee(state),
};
}
diff --git a/ui/pages/confirmations/token-allowance/token-allowance.js b/ui/pages/confirmations/token-allowance/token-allowance.js
index d169644e492e..e8d6bbf5bbbe 100644
--- a/ui/pages/confirmations/token-allowance/token-allowance.js
+++ b/ui/pages/confirmations/token-allowance/token-allowance.js
@@ -90,7 +90,6 @@ export default function TokenAllowance({
hexTransactionTotal,
hexMinimumTransactionFee,
txData,
- isMultiLayerFeeNetwork,
supportsEIP1559,
userAddress,
tokenAddress,
@@ -531,7 +530,6 @@ export default function TokenAllowance({
renderTransactionDetailsContent
noBorder={useNonceField || !showFullTxDetails}
supportsEIP1559={supportsEIP1559}
- isMultiLayerFeeNetwork={isMultiLayerFeeNetwork}
ethTransactionTotal={ethTransactionTotal}
nativeCurrency={nativeCurrency}
fullTxData={fullTxData}
@@ -706,10 +704,6 @@ TokenAllowance.propTypes = {
* Current transaction
*/
txData: PropTypes.object,
- /**
- * Is multi-layer fee network or not
- */
- isMultiLayerFeeNetwork: PropTypes.bool,
/**
* Is the enhanced gas fee enabled or not
*/
diff --git a/ui/pages/confirmations/token-allowance/token-allowance.stories-to-do.js b/ui/pages/confirmations/token-allowance/token-allowance.stories-to-do.js
index fa9b52724817..9c08a176b4d4 100644
--- a/ui/pages/confirmations/token-allowance/token-allowance.stories-to-do.js
+++ b/ui/pages/confirmations/token-allowance/token-allowance.stories-to-do.js
@@ -33,9 +33,6 @@ export default {
hexTransactionTotal: {
control: 'text',
},
- isMultiLayerFeeNetwork: {
- control: 'text',
- },
supportsEIP1559: {
control: 'boolean',
},
@@ -82,7 +79,6 @@ export default {
ethTransactionTotal: '0.0012',
fiatTransactionTotal: '1.6',
hexTransactionTotal: '0x44364c5bb0000',
- isMultiLayerFeeNetwork: false,
supportsEIP1559: false,
userAddress: '0xdd34b35ca1de17dfcdc07f79ff1f8f94868c40a1',
tokenAddress: '0x55797717b9947b31306f4aac7ad1365c6e3923bd',
diff --git a/ui/pages/confirmations/token-allowance/token-allowance.stories.js b/ui/pages/confirmations/token-allowance/token-allowance.stories.js
index 57b984cd122d..ed6078bf2a87 100644
--- a/ui/pages/confirmations/token-allowance/token-allowance.stories.js
+++ b/ui/pages/confirmations/token-allowance/token-allowance.stories.js
@@ -19,7 +19,6 @@ const defaultArgs = {
ethTransactionTotal: '0.0012',
fiatTransactionTotal: '1.6',
hexTransactionTotal: '0x44364c5bb0000',
- isMultiLayerFeeNetwork: false,
supportsEIP1559: false,
userAddress: '0x9d0ba4ddac06032527b140912ec808ab9451b788',
tokenAddress: '0x55797717b9947b31306f4aac7ad1365c6e3923bd',
@@ -161,9 +160,6 @@ export default {
hexTransactionTotal: {
control: 'text',
},
- isMultiLayerFeeNetwork: {
- control: 'boolean',
- },
supportsEIP1559: {
control: 'boolean',
},
diff --git a/ui/pages/confirmations/token-allowance/token-allowance.test.js b/ui/pages/confirmations/token-allowance/token-allowance.test.js
index 793d659d5f57..37e8a58b5e5c 100644
--- a/ui/pages/confirmations/token-allowance/token-allowance.test.js
+++ b/ui/pages/confirmations/token-allowance/token-allowance.test.js
@@ -179,7 +179,6 @@ describe('TokenAllowancePage', () => {
ethTransactionTotal: '0.0012',
fiatTransactionTotal: '1.6',
hexTransactionTotal: '0x44364c5bb0000',
- isMultiLayerFeeNetwork: false,
supportsEIP1559: true,
userAddress: '0x0dcd5d886577d5081b0c52e242ef29e70be3e7bc',
tokenAddress: '0x55797717b9947b31306f4aac7ad1365c6e3923bd',
diff --git a/ui/pages/swaps/prepare-swap-page/review-quote.js b/ui/pages/swaps/prepare-swap-page/review-quote.js
index b1d68921358f..a2a471e19917 100644
--- a/ui/pages/swaps/prepare-swap-page/review-quote.js
+++ b/ui/pages/swaps/prepare-swap-page/review-quote.js
@@ -61,7 +61,6 @@ import {
getHardwareWalletType,
checkNetworkAndAccountSupports1559,
getUSDConversionRate,
- getIsMultiLayerFeeNetwork,
} from '../../../selectors';
import {
getSmartTransactionsOptInStatus,
@@ -198,7 +197,6 @@ export default function ReviewQuote({ setReceiveToAmount }) {
const { balance: ethBalance } = useSelector(getSelectedAccount, shallowEqual);
const conversionRate = useSelector(conversionRateSelector);
const USDConversionRate = useSelector(getUSDConversionRate);
- const isMultiLayerFeeNetwork = useSelector(getIsMultiLayerFeeNetwork);
const currentCurrency = useSelector(getCurrentCurrency);
const swapsTokens = useSelector(getTokens, isEqual);
const networkAndAccountSupports1559 = useSelector(
@@ -988,7 +986,7 @@ export default function ReviewQuote({ setReceiveToAmount }) {
]);
useEffect(() => {
- if (!isMultiLayerFeeNetwork || !usedQuote?.multiLayerL1TradeFeeTotal) {
+ if (!usedQuote?.multiLayerL1TradeFeeTotal) {
return;
}
const getEstimatedL1Fees = async () => {
@@ -1019,13 +1017,7 @@ export default function ReviewQuote({ setReceiveToAmount }) {
}
};
getEstimatedL1Fees();
- }, [
- unsignedTransaction,
- approveTxParams,
- isMultiLayerFeeNetwork,
- chainId,
- usedQuote,
- ]);
+ }, [unsignedTransaction, approveTxParams, chainId, usedQuote]);
const destinationValue = calcTokenValue(
destinationTokenValue,
diff --git a/ui/pages/swaps/view-quote/view-quote.js b/ui/pages/swaps/view-quote/view-quote.js
index 24f2d12a077b..3525cb457f94 100644
--- a/ui/pages/swaps/view-quote/view-quote.js
+++ b/ui/pages/swaps/view-quote/view-quote.js
@@ -62,7 +62,6 @@ import {
getHardwareWalletType,
checkNetworkAndAccountSupports1559,
getUSDConversionRate,
- getIsMultiLayerFeeNetwork,
} from '../../../selectors';
import {
getSmartTransactionsOptInStatus,
@@ -170,7 +169,6 @@ export default function ViewQuote() {
const { balance: ethBalance } = useSelector(getSelectedAccount, shallowEqual);
const conversionRate = useSelector(conversionRateSelector);
const USDConversionRate = useSelector(getUSDConversionRate);
- const isMultiLayerFeeNetwork = useSelector(getIsMultiLayerFeeNetwork);
const currentCurrency = useSelector(getCurrentCurrency);
const swapsTokens = useSelector(getTokens, isEqual);
const networkAndAccountSupports1559 = useSelector(
@@ -890,7 +888,7 @@ export default function ViewQuote() {
]);
useEffect(() => {
- if (!isMultiLayerFeeNetwork || !usedQuote?.multiLayerL1TradeFeeTotal) {
+ if (!usedQuote?.multiLayerL1TradeFeeTotal) {
return;
}
const getEstimatedL1Fees = async () => {
@@ -921,13 +919,7 @@ export default function ViewQuote() {
}
};
getEstimatedL1Fees();
- }, [
- unsignedTransaction,
- approveTxParams,
- isMultiLayerFeeNetwork,
- chainId,
- usedQuote,
- ]);
+ }, [unsignedTransaction, approveTxParams, chainId, usedQuote]);
useEffect(() => {
if (isSmartTransaction) {
diff --git a/ui/selectors/selectors.js b/ui/selectors/selectors.js
index 8ddab3bf2617..6f66112c88b5 100644
--- a/ui/selectors/selectors.js
+++ b/ui/selectors/selectors.js
@@ -1991,36 +1991,6 @@ export const getAllEnabledNetworks = createDeepEqualSelector(
},
);
-export function getIsOptimism(state) {
- return (
- getCurrentChainId(state) === CHAIN_IDS.OPTIMISM ||
- getCurrentChainId(state) === CHAIN_IDS.OPTIMISM_TESTNET ||
- getCurrentChainId(state) === CHAIN_IDS.OPTIMISM_GOERLI
- );
-}
-
-export function getIsBase(state) {
- return (
- getCurrentChainId(state) === CHAIN_IDS.BASE ||
- getCurrentChainId(state) === CHAIN_IDS.BASE_TESTNET
- );
-}
-
-export function getIsOpbnb(state) {
- return (
- getCurrentChainId(state) === CHAIN_IDS.OPBNB ||
- getCurrentChainId(state) === CHAIN_IDS.OPBNB_TESTNET
- );
-}
-
-export function getIsOpStack(state) {
- return getIsOptimism(state) || getIsBase(state) || getIsOpbnb(state);
-}
-
-export function getIsMultiLayerFeeNetwork(state) {
- return getIsOpStack(state);
-}
-
/**
* To retrieve the maxBaseFee and priorityFee the user has set as default
*
diff --git a/yarn.lock b/yarn.lock
index 0f2fc45c57d5..ebe4dd62b24f 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -5791,9 +5791,9 @@ __metadata:
languageName: node
linkType: hard
-"@metamask/transaction-controller@npm:^28.0.0":
- version: 28.0.0
- resolution: "@metamask/transaction-controller@npm:28.0.0"
+"@metamask/transaction-controller@npm:^28.1.0":
+ version: 28.1.0
+ resolution: "@metamask/transaction-controller@npm:28.1.0"
dependencies:
"@ethereumjs/common": "npm:^3.2.0"
"@ethereumjs/tx": "npm:^4.2.0"
@@ -5822,7 +5822,7 @@ __metadata:
"@metamask/approval-controller": ^6.0.0
"@metamask/gas-fee-controller": ^15.0.0
"@metamask/network-controller": ^18.0.0
- checksum: 8ec07273410867265e60f338748a3c6da1333fcf26e24a6d8fb73d7ce6ec4c4693cb897471835c568684c98e14d46250d95971f81349190b70c9f38767c92bb5
+ checksum: e043b74ba17ccf702226bf7bad4bd251d35485fc7d90da2108a5d188a0016bd1ed65a4b63e29c6395161c02964ac36936493d8cee43bfad147132fca17344df3
languageName: node
linkType: hard
@@ -24816,7 +24816,7 @@ __metadata:
"@metamask/snaps-utils": "npm:^7.1.0"
"@metamask/test-bundler": "npm:^1.0.0"
"@metamask/test-dapp": "npm:^8.4.0"
- "@metamask/transaction-controller": "npm:^28.0.0"
+ "@metamask/transaction-controller": "npm:^28.1.0"
"@metamask/user-operation-controller": "npm:^6.0.0"
"@metamask/utils": "npm:^8.2.1"
"@ngraveio/bc-ur": "npm:^1.1.12"