-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy path40243.578d0dc9.iframe.bundle.js
1 lines (1 loc) · 26.9 KB
/
40243.578d0dc9.iframe.bundle.js
1
"use strict";(globalThis.webpackChunkmetamask_crx=globalThis.webpackChunkmetamask_crx||[]).push([[40243],{"./ui/pages/confirmations/components/confirm/info/hooks/useSupportsEIP1559.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{M:()=>useSupportsEIP1559});var _metamask_transaction_controller__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/@metamask/transaction-controller/dist/types.mjs"),react_redux__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react-redux/es/index.js"),_helpers_utils_transactions_util__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./ui/helpers/utils/transactions.util.js"),_selectors__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./ui/selectors/index.js"),_shared_modules_selectors_networks__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./shared/modules/selectors/networks.ts");function useSupportsEIP1559(transactionMeta){var _transactionMeta_txParams,isLegacyTxn=(null==transactionMeta?void 0:null===(_transactionMeta_txParams=transactionMeta.txParams)||void 0===_transactionMeta_txParams?void 0:_transactionMeta_txParams.type)===_metamask_transaction_controller__WEBPACK_IMPORTED_MODULE_4__.tB.legacy||(0,_helpers_utils_transactions_util__WEBPACK_IMPORTED_MODULE_1__.yj)(transactionMeta),selectedNetworkClientId=(0,react_redux__WEBPACK_IMPORTED_MODULE_0__.d4)(_shared_modules_selectors_networks__WEBPACK_IMPORTED_MODULE_3__.EQ);return{supportsEIP1559:(0,react_redux__WEBPACK_IMPORTED_MODULE_0__.d4)(function(state){return(0,_selectors__WEBPACK_IMPORTED_MODULE_2__.PQP)(state,selectedNetworkClientId)})&&!isLegacyTxn}}},"./ui/pages/confirmations/components/confirm/info/shared/constants.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{I:()=>TOKEN_VALUE_UNLIMITED_THRESHOLD,L:()=>HEX_ZERO});var HEX_ZERO="0x0",TOKEN_VALUE_UNLIMITED_THRESHOLD=1e15},"./ui/pages/confirmations/components/confirm/info/shared/edit-gas-fees-row/edit-gas-fees-row.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{H:()=>EditGasFeesRow});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),react_redux__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react-redux/es/index.js"),_shared_constants_network__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./shared/constants/network.ts"),_components_app_confirm_info_row_alert_row_alert_row__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./ui/components/app/confirm/info/row/alert-row/alert-row.tsx"),_components_app_confirm_info_row_constants__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./ui/components/app/confirm/info/row/constants.ts"),_components_component_library__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./ui/components/component-library/index.ts"),_components_ui_tooltip__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./ui/components/ui/tooltip/index.js"),_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./ui/helpers/constants/design-system.ts"),_hooks_useI18nContext__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./ui/hooks/useI18nContext.js"),_selectors__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./ui/selectors/index.js"),_context_confirm__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("./ui/pages/confirmations/context/confirm/index.tsx"),_edit_gas_icon_edit_gas_icon_button__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__("./ui/pages/confirmations/components/confirm/info/shared/edit-gas-icon/edit-gas-icon-button.tsx"),EditGasFeesRow=function(param){var fiatFee=param.fiatFee,fiatFeeWith18SignificantDigits=param.fiatFeeWith18SignificantDigits,nativeFee=param.nativeFee,supportsEIP1559=param.supportsEIP1559,setShowCustomizeGasPopover=param.setShowCustomizeGasPopover,t=(0,_hooks_useI18nContext__WEBPACK_IMPORTED_MODULE_8__.P)(),transactionMeta=(0,_context_confirm__WEBPACK_IMPORTED_MODULE_10__.TW)().currentConfirmation,isTestnet=_shared_constants_network__WEBPACK_IMPORTED_MODULE_2__.YP.includes(transactionMeta.chainId),showFiatInTestnets=(0,react_redux__WEBPACK_IMPORTED_MODULE_1__.d4)(_selectors__WEBPACK_IMPORTED_MODULE_9__.lX9).showFiatInTestnets;return react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_app_confirm_info_row_alert_row_alert_row__WEBPACK_IMPORTED_MODULE_3__.n,{alertKey:_components_app_confirm_info_row_constants__WEBPACK_IMPORTED_MODULE_4__.oE.EstimatedFee,ownerId:transactionMeta.id,"data-testid":"edit-gas-fees-row",label:t("networkFee"),tooltip:t("estimatedFeeTooltip")},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_component_library__WEBPACK_IMPORTED_MODULE_5__.az,{display:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_7__.nl.Flex,flexDirection:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_7__.bo.Row,justifyContent:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_7__.A9.spaceBetween,alignItems:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_7__.k2.center,textAlign:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_7__.nO.Center},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_edit_gas_icon_edit_gas_icon_button__WEBPACK_IMPORTED_MODULE_11__.N,{supportsEIP1559:supportsEIP1559,setShowCustomizeGasPopover:setShowCustomizeGasPopover}),react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_component_library__WEBPACK_IMPORTED_MODULE_5__.EY,{marginRight:1,color:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_7__.r7.textDefault,"data-testid":"first-gas-field"},nativeFee),(!isTestnet||showFiatInTestnets)&&fiatFeeWith18SignificantDigits?react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_ui_tooltip__WEBPACK_IMPORTED_MODULE_6__.A,{title:fiatFeeWith18SignificantDigits},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_component_library__WEBPACK_IMPORTED_MODULE_5__.EY,{marginRight:2,color:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_7__.r7.textAlternative,"data-testid":"native-currency"},fiatFee)):react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_component_library__WEBPACK_IMPORTED_MODULE_5__.EY,{marginRight:2,color:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_7__.r7.textAlternative,"data-testid":"native-currency"},fiatFee)))};try{EditGasFeesRow.displayName="EditGasFeesRow",EditGasFeesRow.__docgenInfo={description:"",displayName:"EditGasFeesRow",props:{fiatFee:{defaultValue:null,description:"",name:"fiatFee",required:!0,type:{name:"string"}},fiatFeeWith18SignificantDigits:{defaultValue:null,description:"",name:"fiatFeeWith18SignificantDigits",required:!0,type:{name:"string | null"}},nativeFee:{defaultValue:null,description:"",name:"nativeFee",required:!0,type:{name:"string"}},supportsEIP1559:{defaultValue:null,description:"",name:"supportsEIP1559",required:!0,type:{name:"boolean"}},setShowCustomizeGasPopover:{defaultValue:null,description:"",name:"setShowCustomizeGasPopover",required:!0,type:{name:"Dispatch<SetStateAction<boolean>>"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["ui/pages/confirmations/components/confirm/info/shared/edit-gas-fees-row/edit-gas-fees-row.tsx#EditGasFeesRow"]={docgenInfo:EditGasFeesRow.__docgenInfo,name:"EditGasFeesRow",path:"ui/pages/confirmations/components/confirm/info/shared/edit-gas-fees-row/edit-gas-fees-row.tsx#EditGasFeesRow"})}catch(__react_docgen_typescript_loader_error){}},"./ui/pages/confirmations/components/confirm/info/shared/edit-gas-icon/edit-gas-icon-button.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{N:()=>EditGasIconButton});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_components_component_library__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./ui/components/component-library/index.ts"),_contexts_transaction_modal__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./ui/contexts/transaction-modal.js"),_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./ui/helpers/constants/design-system.ts"),_hooks_useTransactionEventFragment__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./ui/pages/confirmations/hooks/useTransactionEventFragment.js"),EditGasIconButton=function(param){var supportsEIP1559=param.supportsEIP1559,setShowCustomizeGasPopover=param.setShowCustomizeGasPopover,openModal=(0,_contexts_transaction_modal__WEBPACK_IMPORTED_MODULE_2__.gb)().openModal,updateTransactionEventFragment=(0,_hooks_useTransactionEventFragment__WEBPACK_IMPORTED_MODULE_4__.W)().updateTransactionEventFragment,openEditEIP1559TxGasFeeModal=function(){updateTransactionEventFragment({gas_edit_attempted:"basic"}),openModal("editGasFee")},openEditGasFeeLegacyTxModal=function(){setShowCustomizeGasPopover(!0)};return react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_component_library__WEBPACK_IMPORTED_MODULE_1__.$n,{style:{textDecoration:"none"},size:_components_component_library__WEBPACK_IMPORTED_MODULE_1__.Mp.Sm,variant:_components_component_library__WEBPACK_IMPORTED_MODULE_1__.Ak.Link,startIconName:_components_component_library__WEBPACK_IMPORTED_MODULE_1__.$M.Edit,color:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_3__.Li.primaryDefault,"data-testid":"edit-gas-fee-icon",onClick:function(){return supportsEIP1559?openEditEIP1559TxGasFeeModal():openEditGasFeeLegacyTxModal()}})};try{EditGasIconButton.displayName="EditGasIconButton",EditGasIconButton.__docgenInfo={description:"",displayName:"EditGasIconButton",props:{supportsEIP1559:{defaultValue:null,description:"",name:"supportsEIP1559",required:!0,type:{name:"boolean"}},setShowCustomizeGasPopover:{defaultValue:null,description:"",name:"setShowCustomizeGasPopover",required:!0,type:{name:"Dispatch<SetStateAction<boolean>>"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["ui/pages/confirmations/components/confirm/info/shared/edit-gas-icon/edit-gas-icon-button.tsx#EditGasIconButton"]={docgenInfo:EditGasIconButton.__docgenInfo,name:"EditGasIconButton",path:"ui/pages/confirmations/components/confirm/info/shared/edit-gas-icon/edit-gas-icon-button.tsx#EditGasIconButton"})}catch(__react_docgen_typescript_loader_error){}},"./ui/pages/confirmations/components/confirm/info/shared/gas-fees-details/gas-fees-details.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{j:()=>GasFeesDetails});var react=__webpack_require__("./node_modules/react/index.js"),es=__webpack_require__("./node_modules/react-redux/es/index.js"),component_library=__webpack_require__("./ui/components/component-library/index.ts"),design_system=__webpack_require__("./ui/helpers/constants/design-system.ts"),useI18nContext=__webpack_require__("./ui/hooks/useI18nContext.js"),preferences=__webpack_require__("./ui/pages/confirmations/selectors/preferences.ts"),context_confirm=__webpack_require__("./ui/pages/confirmations/context/confirm/index.tsx"),gas_timing_component=__webpack_require__("./ui/pages/confirmations/components/gas-timing/gas-timing.component.js"),conversion_utils=__webpack_require__("./shared/modules/conversion.utils.ts"),useEIP1559TxFees=function(transactionMeta){var _transactionMeta_txParams,_transactionMeta_txParams1,hexMaxFeePerGas=null==transactionMeta?void 0:null===(_transactionMeta_txParams=transactionMeta.txParams)||void 0===_transactionMeta_txParams?void 0:_transactionMeta_txParams.maxFeePerGas,hexMaxPriorityFeePerGas=null==transactionMeta?void 0:null===(_transactionMeta_txParams1=transactionMeta.txParams)||void 0===_transactionMeta_txParams1?void 0:_transactionMeta_txParams1.maxPriorityFeePerGas;return(0,react.useMemo)(function(){return{maxFeePerGas:hexMaxFeePerGas?(0,conversion_utils.I0)(hexMaxFeePerGas):"0",maxPriorityFeePerGas:hexMaxPriorityFeePerGas?(0,conversion_utils.I0)(hexMaxPriorityFeePerGas):"0"}},[hexMaxFeePerGas,hexMaxPriorityFeePerGas])},common=__webpack_require__("./shared/constants/common.ts"),Numeric=__webpack_require__("./shared/modules/Numeric.ts"),useFiatFormatter=__webpack_require__("./ui/hooks/useFiatFormatter.ts"),useGasFeeEstimates=__webpack_require__("./ui/hooks/useGasFeeEstimates.js"),metamask=__webpack_require__("./ui/ducks/metamask/metamask.js"),selectors=__webpack_require__("./ui/selectors/index.js"),multichain=__webpack_require__("./ui/selectors/multichain.ts"),constants=__webpack_require__("./ui/pages/confirmations/components/confirm/info/shared/constants.ts"),useSupportsEIP1559=__webpack_require__("./ui/pages/confirmations/components/confirm/info/hooks/useSupportsEIP1559.ts");function useTransactionGasFeeEstimate(transactionMeta,supportsEIP1559){var _transactionMeta_txParams,_transactionMeta_txParams1,gasEstimate,_transactionMeta_txParams2=transactionMeta.txParams,gasLimit=_transactionMeta_txParams2.gas,gasPrice=_transactionMeta_txParams2.gasPrice,gasFeeEstimates=(0,useGasFeeEstimates.K)(transactionMeta.networkClientId).gasFeeEstimates,estimatedBaseFee=null==gasFeeEstimates?void 0:gasFeeEstimates.estimatedBaseFee;gasLimit=gasLimit||constants.L,gasPrice=gasPrice||constants.L;var maxPriorityFeePerGas=(null===(_transactionMeta_txParams=transactionMeta.txParams)||void 0===_transactionMeta_txParams?void 0:_transactionMeta_txParams.maxPriorityFeePerGas)||constants.L,maxFeePerGas=(null===(_transactionMeta_txParams1=transactionMeta.txParams)||void 0===_transactionMeta_txParams1?void 0:_transactionMeta_txParams1.maxFeePerGas)||constants.L;if(supportsEIP1559){var minimumFeePerGas=(0,conversion_utils.XH)(estimatedBaseFee||constants.L,maxPriorityFeePerGas);new Numeric.e(minimumFeePerGas,16).greaterThan(maxFeePerGas,16)&&(minimumFeePerGas=maxFeePerGas),gasEstimate=(0,conversion_utils.Is)(minimumFeePerGas,gasLimit)}else gasEstimate=(0,conversion_utils.Is)(gasPrice,gasLimit);return gasEstimate}var EMPTY_FEES={currentCurrencyFee:"",currentCurrencyFeeWith18SignificantDigits:"",nativeCurrencyFee:""};function useFeeCalculations(transactionMeta){var _multichainNetwork_network,_transactionMeta_txParams,_transactionMeta_txParams1,currentCurrency=(0,es.d4)(metamask.Fx),chainId=transactionMeta.chainId,fiatFormatter=(0,useFiatFormatter.y)(),conversionRate=(0,es.d4)(function(state){return(0,selectors._po)(state,chainId)}),multichainNetwork=(0,es.d4)(multichain.X3),ticker=null==multichainNetwork?void 0:null===(_multichainNetwork_network=multichainNetwork.network)||void 0===_multichainNetwork_network?void 0:_multichainNetwork_network.ticker,getFeesFromHex=(0,react.useCallback)(function(hexFee){var currentCurrencyFee,currentCurrencyFeeWith18SignificantDigits,nativeCurrencyFee="".concat((0,conversion_utils.gh)({value:hexFee,fromCurrency:common.sk.GWEI,numberOfDecimals:4})||0," ").concat(ticker),decimalCurrentCurrencyFee=Number((0,conversion_utils.gh)({value:hexFee,conversionRate:conversionRate,fromCurrency:common.sk.GWEI,toCurrency:currentCurrency,numberOfDecimals:2}));return 0===decimalCurrentCurrencyFee?(currentCurrencyFee="< ".concat(fiatFormatter(.01)),currentCurrencyFeeWith18SignificantDigits=(0,conversion_utils.gh)({value:hexFee,conversionRate:conversionRate,fromCurrency:common.sk.GWEI,toCurrency:currentCurrency,numberOfDecimals:18})):(currentCurrencyFee=fiatFormatter(decimalCurrentCurrencyFee),currentCurrencyFeeWith18SignificantDigits=null),{currentCurrencyFee:currentCurrencyFee,currentCurrencyFeeWith18SignificantDigits:currentCurrencyFeeWith18SignificantDigits,nativeCurrencyFee:nativeCurrencyFee}},[conversionRate,currentCurrency,fiatFormatter]),_useEIP1559TxFees=useEIP1559TxFees(transactionMeta),maxFeePerGas=_useEIP1559TxFees.maxFeePerGas,maxPriorityFeePerGas=_useEIP1559TxFees.maxPriorityFeePerGas,supportsEIP1559=(0,useSupportsEIP1559.M)(transactionMeta).supportsEIP1559,gasFeeEstimate=useTransactionGasFeeEstimate(transactionMeta,supportsEIP1559),gasFeeEstimates=(0,useGasFeeEstimates.K)(transactionMeta.networkClientId).gasFeeEstimates,estimatedBaseFee=null==gasFeeEstimates?void 0:gasFeeEstimates.estimatedBaseFee,layer1GasFee=null==transactionMeta?void 0:transactionMeta.layer1GasFee,hasLayer1GasFee=!!layer1GasFee,feesL1=(0,react.useMemo)(function(){return hasLayer1GasFee?getFeesFromHex(layer1GasFee):EMPTY_FEES},[layer1GasFee]),feesL2=(0,react.useMemo)(function(){return hasLayer1GasFee?getFeesFromHex(gasFeeEstimate):EMPTY_FEES},[gasFeeEstimate]),gasLimit=(null==transactionMeta?void 0:null===(_transactionMeta_txParams=transactionMeta.txParams)||void 0===_transactionMeta_txParams?void 0:_transactionMeta_txParams.gas)||constants.L,gasPrice=(null==transactionMeta?void 0:null===(_transactionMeta_txParams1=transactionMeta.txParams)||void 0===_transactionMeta_txParams1?void 0:_transactionMeta_txParams1.gasPrice)||constants.L,_getFeesFromHex=getFeesFromHex((0,react.useMemo)(function(){return(0,conversion_utils.Is)(supportsEIP1559?(0,conversion_utils.Ao)(maxFeePerGas):gasPrice,gasLimit)},[supportsEIP1559,maxFeePerGas,gasLimit,gasPrice])),maxFeeFiat=_getFeesFromHex.currentCurrencyFee,maxFeeFiatWith18SignificantDigits=_getFeesFromHex.currentCurrencyFeeWith18SignificantDigits,maxFeeNative=_getFeesFromHex.nativeCurrencyFee,estimatedFees=(0,react.useMemo)(function(){if(hasLayer1GasFee)return getFeesFromHex((0,conversion_utils.XH)(gasFeeEstimate,layer1GasFee));var minimumFeePerGas=(0,conversion_utils.XH)((0,conversion_utils.Sb)(estimatedBaseFee)||constants.L,(0,conversion_utils.Ao)(maxPriorityFeePerGas));return new Numeric.e(minimumFeePerGas,16).greaterThan((0,conversion_utils.Ao)(maxFeePerGas),16)&&(minimumFeePerGas=(0,conversion_utils.Ao)(maxFeePerGas)),getFeesFromHex((0,conversion_utils.Is)(supportsEIP1559?minimumFeePerGas:gasPrice,gasLimit))},[gasFeeEstimate,transactionMeta,estimatedBaseFee,maxPriorityFeePerGas,getFeesFromHex]);return{estimatedFeeFiat:estimatedFees.currentCurrencyFee,estimatedFeeFiatWith18SignificantDigits:estimatedFees.currentCurrencyFeeWith18SignificantDigits,estimatedFeeNative:estimatedFees.nativeCurrencyFee,l1FeeFiat:feesL1.currentCurrencyFee,l1FeeFiatWith18SignificantDigits:feesL1.currentCurrencyFeeWith18SignificantDigits,l1FeeNative:feesL1.nativeCurrencyFee,l2FeeFiat:feesL2.currentCurrencyFee,l2FeeFiatWith18SignificantDigits:feesL2.currentCurrencyFeeWith18SignificantDigits,l2FeeNative:feesL2.nativeCurrencyFee,maxFeeFiat:maxFeeFiat,maxFeeFiatWith18SignificantDigits:maxFeeFiatWith18SignificantDigits,maxFeeNative:maxFeeNative}}var edit_gas_fees_row=__webpack_require__("./ui/pages/confirmations/components/confirm/info/shared/edit-gas-fees-row/edit-gas-fees-row.tsx"),gas_fees_row=__webpack_require__("./ui/pages/confirmations/components/confirm/info/shared/gas-fees-row/gas-fees-row.tsx"),alert_row=__webpack_require__("./ui/components/app/confirm/info/row/alert-row/alert-row.tsx"),row_constants=__webpack_require__("./ui/components/app/confirm/info/row/constants.ts"),GasFeesDetails=function(param){var setShowCustomizeGasPopover=param.setShowCustomizeGasPopover,t=(0,useI18nContext.P)(),transactionMeta=(0,context_confirm.TW)().currentConfirmation,_useEIP1559TxFees=useEIP1559TxFees(transactionMeta),maxFeePerGas=_useEIP1559TxFees.maxFeePerGas,maxPriorityFeePerGas=_useEIP1559TxFees.maxPriorityFeePerGas,supportsEIP1559=(0,useSupportsEIP1559.M)(transactionMeta).supportsEIP1559,hasLayer1GasFee=!!(null==transactionMeta?void 0:transactionMeta.layer1GasFee),_useFeeCalculations=useFeeCalculations(transactionMeta),estimatedFeeFiat=_useFeeCalculations.estimatedFeeFiat,estimatedFeeFiatWith18SignificantDigits=_useFeeCalculations.estimatedFeeFiatWith18SignificantDigits,estimatedFeeNative=_useFeeCalculations.estimatedFeeNative,l1FeeFiat=_useFeeCalculations.l1FeeFiat,l1FeeFiatWith18SignificantDigits=_useFeeCalculations.l1FeeFiatWith18SignificantDigits,l1FeeNative=_useFeeCalculations.l1FeeNative,l2FeeFiat=_useFeeCalculations.l2FeeFiat,l2FeeFiatWith18SignificantDigits=_useFeeCalculations.l2FeeFiatWith18SignificantDigits,l2FeeNative=_useFeeCalculations.l2FeeNative,maxFeeFiat=_useFeeCalculations.maxFeeFiat,maxFeeFiatWith18SignificantDigits=_useFeeCalculations.maxFeeFiatWith18SignificantDigits,maxFeeNative=_useFeeCalculations.maxFeeNative,showAdvancedDetails=(0,es.d4)(preferences.O);return(null==transactionMeta?void 0:transactionMeta.txParams)?react.createElement(react.Fragment,null,react.createElement(edit_gas_fees_row.H,{fiatFee:estimatedFeeFiat,fiatFeeWith18SignificantDigits:estimatedFeeFiatWith18SignificantDigits,nativeFee:estimatedFeeNative,supportsEIP1559:supportsEIP1559,setShowCustomizeGasPopover:setShowCustomizeGasPopover}),showAdvancedDetails&&hasLayer1GasFee&&react.createElement(react.Fragment,null,react.createElement(gas_fees_row.n,{"data-testid":"gas-fee-details-l1",label:t("l1Fee"),tooltipText:t("l1FeeTooltip"),fiatFee:l1FeeFiat,fiatFeeWith18SignificantDigits:l1FeeFiatWith18SignificantDigits,nativeFee:l1FeeNative}),react.createElement(gas_fees_row.n,{"data-testid":"gas-fee-details-l2",label:t("l2Fee"),tooltipText:t("l2FeeTooltip"),fiatFee:l2FeeFiat,fiatFeeWith18SignificantDigits:l2FeeFiatWith18SignificantDigits,nativeFee:l2FeeNative})),supportsEIP1559&&react.createElement(alert_row.n,{alertKey:row_constants.oE.Speed,"data-testid":"gas-fee-details-speed",label:t("speed"),ownerId:transactionMeta.id},react.createElement(component_library.az,{display:design_system.nl.Flex,alignItems:design_system.k2.center},react.createElement(gas_timing_component.A,{maxFeePerGas:maxFeePerGas,maxPriorityFeePerGas:maxPriorityFeePerGas}))),showAdvancedDetails&&react.createElement(gas_fees_row.n,{"data-testid":"gas-fee-details-max-fee",label:t("maxFee"),tooltipText:t("maxFeeTooltip"),fiatFee:maxFeeFiat,fiatFeeWith18SignificantDigits:maxFeeFiatWith18SignificantDigits,nativeFee:maxFeeNative})):null};try{GasFeesDetails.displayName="GasFeesDetails",GasFeesDetails.__docgenInfo={description:"",displayName:"GasFeesDetails",props:{setShowCustomizeGasPopover:{defaultValue:null,description:"",name:"setShowCustomizeGasPopover",required:!0,type:{name:"Dispatch<SetStateAction<boolean>>"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["ui/pages/confirmations/components/confirm/info/shared/gas-fees-details/gas-fees-details.tsx#GasFeesDetails"]={docgenInfo:GasFeesDetails.__docgenInfo,name:"GasFeesDetails",path:"ui/pages/confirmations/components/confirm/info/shared/gas-fees-details/gas-fees-details.tsx#GasFeesDetails"})}catch(__react_docgen_typescript_loader_error){}},"./ui/pages/confirmations/components/confirm/info/shared/gas-fees-row/gas-fees-row.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{n:()=>GasFeesRow});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),react_redux__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react-redux/es/index.js"),_shared_constants_network__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./shared/constants/network.ts"),_components_app_confirm_info_row__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./ui/components/app/confirm/info/row/index.ts"),_components_component_library__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./ui/components/component-library/index.ts"),_components_ui_tooltip__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./ui/components/ui/tooltip/index.js"),_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./ui/helpers/constants/design-system.ts"),_selectors__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./ui/selectors/index.js"),_context_confirm__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./ui/pages/confirmations/context/confirm/index.tsx"),GasFeesRow=function(param){var label=param.label,tooltipText=param.tooltipText,fiatFee=param.fiatFee,fiatFeeWith18SignificantDigits=param.fiatFeeWith18SignificantDigits,nativeFee=param.nativeFee,dataTestId=param["data-testid"],transactionMeta=(0,_context_confirm__WEBPACK_IMPORTED_MODULE_8__.TW)().currentConfirmation,isTestnet=_shared_constants_network__WEBPACK_IMPORTED_MODULE_2__.YP.includes(null==transactionMeta?void 0:transactionMeta.chainId),showFiatInTestnets=(0,react_redux__WEBPACK_IMPORTED_MODULE_1__.d4)(_selectors__WEBPACK_IMPORTED_MODULE_7__.lX9).showFiatInTestnets;return react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_app_confirm_info_row__WEBPACK_IMPORTED_MODULE_3__.z$,{"data-testid":dataTestId,label:label,tooltip:tooltipText,variant:_components_app_confirm_info_row__WEBPACK_IMPORTED_MODULE_3__.aj.Default},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_component_library__WEBPACK_IMPORTED_MODULE_4__.az,{display:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_6__.nl.Flex,flexDirection:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_6__.bo.Row,justifyContent:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_6__.A9.spaceBetween,alignItems:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_6__.k2.center,textAlign:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_6__.nO.Center,marginLeft:8},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_component_library__WEBPACK_IMPORTED_MODULE_4__.EY,{marginRight:1,color:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_6__.r7.textDefault},nativeFee),(!isTestnet||showFiatInTestnets)&&fiatFeeWith18SignificantDigits?react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_ui_tooltip__WEBPACK_IMPORTED_MODULE_5__.A,{title:fiatFeeWith18SignificantDigits},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_component_library__WEBPACK_IMPORTED_MODULE_4__.EY,{color:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_6__.r7.textAlternative},fiatFee)):react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_component_library__WEBPACK_IMPORTED_MODULE_4__.EY,{color:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_6__.r7.textAlternative},fiatFee)))};try{GasFeesRow.displayName="GasFeesRow",GasFeesRow.__docgenInfo={description:"",displayName:"GasFeesRow",props:{label:{defaultValue:null,description:"",name:"label",required:!0,type:{name:"string"}},tooltipText:{defaultValue:null,description:"",name:"tooltipText",required:!0,type:{name:"string"}},fiatFee:{defaultValue:null,description:"",name:"fiatFee",required:!0,type:{name:"string"}},fiatFeeWith18SignificantDigits:{defaultValue:null,description:"",name:"fiatFeeWith18SignificantDigits",required:!0,type:{name:"string | null"}},nativeFee:{defaultValue:null,description:"",name:"nativeFee",required:!0,type:{name:"string"}},"data-testid":{defaultValue:null,description:"",name:"data-testid",required:!1,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["ui/pages/confirmations/components/confirm/info/shared/gas-fees-row/gas-fees-row.tsx#GasFeesRow"]={docgenInfo:GasFeesRow.__docgenInfo,name:"GasFeesRow",path:"ui/pages/confirmations/components/confirm/info/shared/gas-fees-row/gas-fees-row.tsx#GasFeesRow"})}catch(__react_docgen_typescript_loader_error){}},"./ui/pages/confirmations/selectors/preferences.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{C:()=>selectUseTransactionSimulations,O:()=>selectConfirmationAdvancedDetailsOpen});var _selectors__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./ui/selectors/index.js"),selectUseTransactionSimulations=function(state){return state.metamask.useTransactionSimulations};function selectConfirmationAdvancedDetailsOpen(state){return!!(0,_selectors__WEBPACK_IMPORTED_MODULE_0__.lX9)(state).showConfirmationAdvancedDetails}}}]);