LavaPack.loadBundle([[9994,{"@metamask/utils":4298},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.collectTransactionTokenScanKeys=s,r.filterMaliciousTransactions=function(e,t){return e.filter(e=>!function(e,t){return s(e).some(e=>t.has(e))}(e,t))},r.generateTokenCacheKey=n;var a=e("@metamask/utils");function n(e,t){return`${e.toLowerCase()}:${t.toLowerCase()}`}function o(e,t){for(const r of e){const e=r?.asset;if(!e||!("fungible"in e)||!e.fungible)continue;if(!(0,a.isCaipAssetType)(e.type))continue;const o=(0,a.parseCaipAssetType)(e.type);"token"===o.assetNamespace&&t.add(n(`${o.chain.namespace}:${o.chain.reference}`,o.assetReference))}}function s(e){const t=new Set;o(e.from??[],t),o(e.to??[],t);for(const r of e.fees??[])o([r],t);return[...t]}}}},{package:"$root$",file:"ui/helpers/utils/token-scan.ts"}],[9996,{"../../../shared/constants/metametrics":8488,"../../../shared/lib/hardware-wallet-recovery-metrics":8616,"../../contexts/hardware-wallets/errors":9877,"../../contexts/hardware-wallets/rpcErrorUtils":9879,"../../contexts/hardware-wallets/types":9880,"@metamask/hw-wallet-sdk":2771},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.trackHardwareWalletRecoveryConnectCtaClicked=function(e,t){const{location:r,walletType:l,connectionState:u}=t;if(!l)return;const d=(0,o.mapHardwareWalletTypeToMetricDeviceType)(l);if(!d)return;const w=(u.status===i.ConnectionStatus.ErrorState?u.error:undefined)??(0,s.createHardwareWalletError)(a.ErrorCode.DeviceDisconnected,l),f=(0,c.getHardwareWalletErrorCode)(w),p=(0,o.mapHardwareWalletRecoveryErrorType)(w),h=`${r}:${l}:${String(f)}:${p}`,y=(0,o.nextHardwareWalletRecoveryInlineCtaViewCount)(h);e({category:n.MetaMetricsEventCategory.Accounts,event:n.MetaMetricsEventName.HardwareWalletRecoveryCtaClicked,properties:(0,o.buildHardwareWalletRecoverySegmentProperties)({location:r,deviceType:d,deviceModel:(0,o.getHardwareWalletMetricDeviceModel)(w),errorType:p,errorTypeViewCount:y,error:w})}).catch(()=>{})};var a=e("@metamask/hw-wallet-sdk"),n=e("../../../shared/constants/metametrics"),o=e("../../../shared/lib/hardware-wallet-recovery-metrics"),s=e("../../contexts/hardware-wallets/errors"),c=e("../../contexts/hardware-wallets/rpcErrorUtils"),i=e("../../contexts/hardware-wallets/types")}}},{package:"$root$",file:"ui/helpers/utils/track-hardware-wallet-recovery-connect-cta-clicked.ts"}]],[],{});