LavaPack.loadBundle([[9993,{"@metamask/utils":4299},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"}],[9995,{"../../../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":2772},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:i,connectionState:u}=t;if(!i)return;const d=(0,o.mapHardwareWalletTypeToMetricDeviceType)(i);if(!d)return;const p=(u.status===c.ConnectionStatus.ErrorState?u.error:undefined)??(0,s.createHardwareWalletError)(a.ErrorCode.DeviceDisconnected,i),f=(0,l.getHardwareWalletErrorCode)(p),h=(0,o.mapHardwareWalletRecoveryErrorType)(p),w=`${r}:${i}:${String(f)}:${h}`,g=(0,o.nextHardwareWalletRecoveryInlineCtaViewCount)(w);e({category:n.MetaMetricsEventCategory.Accounts,event:n.MetaMetricsEventName.HardwareWalletRecoveryCtaClicked,properties:(0,o.buildHardwareWalletRecoverySegmentProperties)({location:r,deviceType:d,deviceModel:(0,o.getHardwareWalletMetricDeviceModel)(p),errorType:h,errorTypeViewCount:g,error:p})}).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"),l=e("../../contexts/hardware-wallets/rpcErrorUtils"),c=e("../../contexts/hardware-wallets/types")}}},{package:"$root$",file:"ui/helpers/utils/track-hardware-wallet-recovery-connect-cta-clicked.ts"}],[9999,{"./util":1e4,loglevel:7162},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e,t,r,a,s,l){n.default.debug("tx-helper called with params:"),n.default.debug({unapprovedTxs:e,personalMsgs:t,decryptMsgs:r,encryptionPublicKeyMsgs:a,typedMessages:s,chainId:l});const c=l?(0,o.valuesFor)(e).filter(e=>e.chainId===l):(0,o.valuesFor)(e),i=(0,o.valuesFor)(t),u=(0,o.valuesFor)(r),d=(0,o.valuesFor)(a),p=(0,o.valuesFor)(s),f=c.concat(i).concat(u).concat(d).concat(p).sort((e,t)=>e.time-t.time);return n.default.debug(`tx helper found ${c.length} unapproved txs`),n.default.debug(`tx helper found ${i.length} unsigned personal messages`),n.default.debug(`tx helper found ${u.length} decrypt requests`),n.default.debug(`tx helper found ${d.length} encryptionPublicKey requests`),n.default.debug(`tx helper found ${p.length} unsigned typed messages`),f};var a,n=(a=e("loglevel"))&&a.__esModule?a:{default:a},o=e("./util")}}},{package:"$root$",file:"ui/helpers/utils/tx-helper.ts"}]],[],{});