diff --git a/UnstoppableWallet/UnstoppableWallet.xcodeproj/project.pbxproj b/UnstoppableWallet/UnstoppableWallet.xcodeproj/project.pbxproj index 45154623cc..8dfceb27ea 100644 --- a/UnstoppableWallet/UnstoppableWallet.xcodeproj/project.pbxproj +++ b/UnstoppableWallet/UnstoppableWallet.xcodeproj/project.pbxproj @@ -312,7 +312,6 @@ 11B3533F0C232F72DB641666 /* CreateAccountService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11B3592A5323E54639864FC7 /* CreateAccountService.swift */; }; 11B3533FFB85258ED5A90401 /* FormValidatedView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11B35614A0EE4AC0FAD9F83A /* FormValidatedView.swift */; }; 11B3534554BA9D9AF8D334D3 /* InputStateWrapperView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11B35B18D0C02E331540538B /* InputStateWrapperView.swift */; }; - 11B3534916B76A847608D1A4 /* WalletConnectRequestModule.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11B356C2E5AF8ED41E2B545D /* WalletConnectRequestModule.swift */; }; 11B35349D234724EE34956A0 /* EvmBlockchainManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11B356D15E318829D9C7F5F1 /* EvmBlockchainManager.swift */; }; 11B3534B12C5E7596E4953F0 /* RestoreSettingsModule.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11B35336293A4473DD9F5C8B /* RestoreSettingsModule.swift */; }; 11B3534B567884E30A871F32 /* AddTokenModule.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11B355267E1A6678B7B5FCF1 /* AddTokenModule.swift */; }; @@ -675,7 +674,6 @@ 11B357BF7588CB317EA62167 /* MarketOverviewCategoryService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11B35A0AF4D03160AF66D1D9 /* MarketOverviewCategoryService.swift */; }; 11B357C425D633543FD109C3 /* DuressModeSelectView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11B3554BC96C9C24C24CC2B0 /* DuressModeSelectView.swift */; }; 11B357C5FC1B7FDE86244DA5 /* SingleSelectorViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11B35CAE2327342F9CEC6AC9 /* SingleSelectorViewController.swift */; }; - 11B357CD9544E312865CE36F /* WalletConnectInteractor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11B35A9F154EC84CEFA909B9 /* WalletConnectInteractor.swift */; }; 11B357D1A2BD673DAB7B4C61 /* SecondaryButtonCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11B3587A6A05EFF1036F6C4B /* SecondaryButtonCell.swift */; }; 11B357D1BFE20978857A2FDC /* LanguageSettingsModule.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11B35D0328E65076E069888A /* LanguageSettingsModule.swift */; }; 11B357D211A75BDFED448AA4 /* MarkdownListItemCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11B357E9508BF369BDFF7753 /* MarkdownListItemCell.swift */; }; @@ -880,7 +878,6 @@ 11B359DDFEAF887EEE3063A7 /* MarketAdvancedSearchService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11B35C19608F6A314CF1F0C5 /* MarketAdvancedSearchService.swift */; }; 11B359E225E30E97A6354FAC /* ListSectionInfoHeader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11B35B23F86488FDB41CC862 /* ListSectionInfoHeader.swift */; }; 11B359E7632FC042278ED912 /* ContactBookManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11B35A6DE18A1E6E837DFB21 /* ContactBookManager.swift */; }; - 11B359E8FA2FD4E7CF6A40AD /* WalletConnectRequestModule.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11B356C2E5AF8ED41E2B545D /* WalletConnectRequestModule.swift */; }; 11B359EA8B77C68A8D9BA4CA /* BottomGradientWrapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11B3557DF76CFEBE7DA50D81 /* BottomGradientWrapper.swift */; }; 11B359F074038D1507C23747 /* EnabledWallet.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11B35BDC2E3F845A52C442AD /* EnabledWallet.swift */; }; 11B359F1AB3B0B00DD42E61C /* TokenProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11B3586E4CACC415DC6404C7 /* TokenProtocol.swift */; }; @@ -1184,7 +1181,6 @@ 11B35D5D90AF10671F704A87 /* TransactionsCoinSelectModule.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11B35FF9B3B86F74961FADE1 /* TransactionsCoinSelectModule.swift */; }; 11B35D6646585145422DA2AD /* HsToolKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11B35D747108CE6727D3103D /* HsToolKit.swift */; }; 11B35D6A1BBE534107A655DE /* FilterView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11B354712C102B954BCEE258 /* FilterView.swift */; }; - 11B35D6C064BE981FDA401D6 /* WalletConnectInteractor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11B35A9F154EC84CEFA909B9 /* WalletConnectInteractor.swift */; }; 11B35D6C50BA6E928A54EDAC /* NftModule.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11B356E0F2BC23304E545B13 /* NftModule.swift */; }; 11B35D71C5893D4B1F1332B5 /* BalanceConversionManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11B351609863530CA8259648 /* BalanceConversionManager.swift */; }; 11B35D720E414376DB0611A8 /* CexWithdrawConfirmViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11B3506758F70E9014947BB3 /* CexWithdrawConfirmViewModel.swift */; }; @@ -2042,8 +2038,20 @@ 6B146A982A52A69400648C10 /* ChartIndicatorSettingsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6B146A932A52A69400648C10 /* ChartIndicatorSettingsViewController.swift */; }; 6B146A9B2A52A69400648C10 /* ChartIndicatorSettingsModule.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6B146A952A52A69400648C10 /* ChartIndicatorSettingsModule.swift */; }; 6B146A9C2A52A69400648C10 /* ChartIndicatorSettingsModule.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6B146A952A52A69400648C10 /* ChartIndicatorSettingsModule.swift */; }; - 6BC3B11C2AE683F900B8E562 /* WidgetCoinAppShowModule.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6BC3B11B2AE683F900B8E562 /* WidgetCoinAppShowModule.swift */; }; - 6BC3B11D2AE683F900B8E562 /* WidgetCoinAppShowModule.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6BC3B11B2AE683F900B8E562 /* WidgetCoinAppShowModule.swift */; }; + 6B29071F2AF0CB8A006157D6 /* WalletConnectAppShowService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6B2907182AF0CB8A006157D6 /* WalletConnectAppShowService.swift */; }; + 6B2907202AF0CB8A006157D6 /* WalletConnectAppShowService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6B2907182AF0CB8A006157D6 /* WalletConnectAppShowService.swift */; }; + 6B2907212AF0CB8A006157D6 /* WalletConnectAppShowModule.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6B2907192AF0CB8A006157D6 /* WalletConnectAppShowModule.swift */; }; + 6B2907222AF0CB8A006157D6 /* WalletConnectAppShowModule.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6B2907192AF0CB8A006157D6 /* WalletConnectAppShowModule.swift */; }; + 6B2907232AF0CB8A006157D6 /* WalletConnectAppShowViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6B29071A2AF0CB8A006157D6 /* WalletConnectAppShowViewModel.swift */; }; + 6B2907242AF0CB8A006157D6 /* WalletConnectAppShowViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6B29071A2AF0CB8A006157D6 /* WalletConnectAppShowViewModel.swift */; }; + 6B2907252AF0CB8A006157D6 /* WalletConnectAppShowView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6B29071B2AF0CB8A006157D6 /* WalletConnectAppShowView.swift */; }; + 6B2907262AF0CB8A006157D6 /* WalletConnectAppShowView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6B29071B2AF0CB8A006157D6 /* WalletConnectAppShowView.swift */; }; + 6B2907272AF0CB8A006157D6 /* WidgetCoinAppShowModule.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6B29071D2AF0CB8A006157D6 /* WidgetCoinAppShowModule.swift */; }; + 6B2907282AF0CB8A006157D6 /* WidgetCoinAppShowModule.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6B29071D2AF0CB8A006157D6 /* WidgetCoinAppShowModule.swift */; }; + 6B2907292AF0CB8A006157D6 /* EventHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6B29071E2AF0CB8A006157D6 /* EventHandler.swift */; }; + 6B29072A2AF0CB8A006157D6 /* EventHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6B29071E2AF0CB8A006157D6 /* EventHandler.swift */; }; + 6B55E33B2AF26D6400616B60 /* Starscream in Frameworks */ = {isa = PBXBuildFile; productRef = 6B55E33A2AF26D6400616B60 /* Starscream */; }; + 6B55E33D2AF26D7A00616B60 /* Starscream in Frameworks */ = {isa = PBXBuildFile; productRef = 6B55E33C2AF26D7A00616B60 /* Starscream */; }; 6BCD53002A161F4100993F20 /* BackupCloudModule.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6BCD52F72A161F4100993F20 /* BackupCloudModule.swift */; }; 6BCD53012A161F4100993F20 /* BackupCloudModule.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6BCD52F72A161F4100993F20 /* BackupCloudModule.swift */; }; 6BCD53022A161F4100993F20 /* ICloudBackupTermsViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6BCD52F92A161F4100993F20 /* ICloudBackupTermsViewModel.swift */; }; @@ -2108,26 +2116,27 @@ ABC9A0C6E37779D3F3602EEC /* SendEip1155AvailableBalanceViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AB612DE3C8AA3A1EEAC7 /* SendEip1155AvailableBalanceViewModel.swift */; }; ABC9A0CE0155F89F12350DFC /* BackupListView.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A4D1C7AE5723851A53EB /* BackupListView.swift */; }; ABC9A0CEBC41CCE5AB205B3C /* NftAssetOverviewModule.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A90781302D793E0773CB /* NftAssetOverviewModule.swift */; }; - ABC9A0E6EE31D5675542EE0B /* SessionRequestFilterManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AA77C414AC06C41F9319 /* SessionRequestFilterManager.swift */; }; ABC9A0E743DDE8F4ADA483EB /* SwapPriceCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AA459E123B7053EC73F0 /* SwapPriceCell.swift */; }; ABC9A0EE5E5B31405569BF3F /* IndicatorAdviceCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AACC40370E1E0CFC7639 /* IndicatorAdviceCell.swift */; }; + ABC9A0EEAF28FD7E8855B68B /* WalletConnectRequestChain.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AC335F1215FE4F79C419 /* WalletConnectRequestChain.swift */; }; ABC9A0F42A6687705CAD1340 /* NftAssetViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AF9C0D0174A5B6A91F13 /* NftAssetViewController.swift */; }; - ABC9A1117A41AB8CE00FDEDB /* WalletConnectAppShowView.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A845B2969166028BA5F0 /* WalletConnectAppShowView.swift */; }; ABC9A12A4D114A2E4F4C711A /* ActivityViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AF395EA01B43D6D77C43 /* ActivityViewController.swift */; }; ABC9A133A6BF0FC9A87FA14A /* ContactBookSettingsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A99184EE1D5D052C52E9 /* ContactBookSettingsViewController.swift */; }; ABC9A13D78DD5F176A170B65 /* FullBackup.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A41F6AA0B65FDA91EB68 /* FullBackup.swift */; }; ABC9A13DB3ADB580D59F66E4 /* SendEip1155ViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A23CB332521C0607CC6B /* SendEip1155ViewModel.swift */; }; ABC9A13F4C814FFB31FF13CA /* SendEip721ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A7315E119F0B1581B70C /* SendEip721ViewController.swift */; }; + ABC9A13FE5AA68886E70CD2D /* WalletConnectRequestHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A88CFC0598CD6D780AC2 /* WalletConnectRequestHandler.swift */; }; ABC9A140CD70E91A1F4A3A5B /* DonateAddressModule.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A0B7E7360DC0357B2D0F /* DonateAddressModule.swift */; }; ABC9A140E5EF9D0AD4234689 /* SendEip1155ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A9C09ECB9B0CCBAD8C21 /* SendEip1155ViewController.swift */; }; ABC9A1636549E626FB32F71A /* WalletTokenBalanceCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AB2DC4C4412EFE6BEFF7 /* WalletTokenBalanceCell.swift */; }; ABC9A191F1E62A20D2D38262 /* BackupCloudPassphraseViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A5544C221860C10BF131 /* BackupCloudPassphraseViewModel.swift */; }; ABC9A19695087B66FD79ED99 /* Array.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A06A64AB5B2A12C38D91 /* Array.swift */; }; - ABC9A1994630FAD8B42DDF67 /* WalletConnectAppShowService.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AA3B8927F9F138ABCFB8 /* WalletConnectAppShowService.swift */; }; + ABC9A1A5A19D4CC70E868727 /* Eip155ProposalHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9ACED8C1A430EB4EB097F /* Eip155ProposalHandler.swift */; }; ABC9A1B8D2BCB6660A12AAE2 /* ChartIndicatorsViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A3AF18834CE9E569C89E /* ChartIndicatorsViewModel.swift */; }; ABC9A1D021B4E9ACCE3DE0BA /* WalletConnectMainViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AEA1D717D8CED8462AB0 /* WalletConnectMainViewModel.swift */; }; ABC9A1D42EED3235129D810B /* BaseSendViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9ABE97578DC667CBDC11A /* BaseSendViewController.swift */; }; ABC9A1D806117252BDECC095 /* ContactBookAddressModule.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A4674CCDED7C12EB5C09 /* ContactBookAddressModule.swift */; }; + ABC9A1DBAB7096605C181247 /* WalletConnectRequestChain.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AC335F1215FE4F79C419 /* WalletConnectRequestChain.swift */; }; ABC9A1E5E31DD2F72BB2A13A /* IntegerAmountInputViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A6D56EBB7FFAD68CFD66 /* IntegerAmountInputViewModel.swift */; }; ABC9A1EC656488FF79F458EC /* RestoreCloudViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A5FE0EDA53E4D9B85DE1 /* RestoreCloudViewModel.swift */; }; ABC9A1FFFB4F9EC58BF78661 /* AccountRestoreWarningManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A7D665A025E95697C757 /* AccountRestoreWarningManager.swift */; }; @@ -2135,6 +2144,7 @@ ABC9A20A25C4C683A73CB994 /* ContactBookContactViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A8080797194017F736AB /* ContactBookContactViewModel.swift */; }; ABC9A20D2DDF8736293DE5C5 /* CoinIndicatorViewItemFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A76776AD840DBFAA1804 /* CoinIndicatorViewItemFactory.swift */; }; ABC9A20F6F7D5EA2A1A55A9E /* ContactLabelService.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AB89F64056FFB98928E7 /* ContactLabelService.swift */; }; + ABC9A220C97C81DC578AA3C7 /* ProposalValidator.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AE997CF6814BA9EAA6BB /* ProposalValidator.swift */; }; ABC9A227648FF076E9518703 /* ContactBookHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AE12A5E8B9FB24FFE42F /* ContactBookHelper.swift */; }; ABC9A23C735BD2271B6A262A /* RestoreManagerViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A999428368A8FA264CA4 /* RestoreManagerViewModel.swift */; }; ABC9A2462F3F928644435B86 /* NftAssetModule.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AD35D41AEEBD38AA08B5 /* NftAssetModule.swift */; }; @@ -2148,6 +2158,7 @@ ABC9A2746046C136F98F970A /* BackupContact.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AC50307ABA3DF7034E1D /* BackupContact.swift */; }; ABC9A2876CBE0C74849C9AC4 /* SwapInputModule.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AAD55B8932EE75E3C037 /* SwapInputModule.swift */; }; ABC9A295A99F39EFAAF8FCDA /* Integer.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AF26FDCB363793BF66E1 /* Integer.swift */; }; + ABC9A2969ACF7FD0801043FE /* Encodable.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A3DFC1E03CB2E6C12F2C /* Encodable.swift */; }; ABC9A29A23C043A3FD65AF1C /* SendBinanceFeeWarningViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A2C2D1331E91D666AB3E /* SendBinanceFeeWarningViewModel.swift */; }; ABC9A2A249A94B271F56EBD0 /* BackupCryptoHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AD5CB1911A698718213F /* BackupCryptoHelper.swift */; }; ABC9A2A6C3A1EFDD33D53287 /* WalletTokenBalanceModule.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A1833D302B63028A3966 /* WalletTokenBalanceModule.swift */; }; @@ -2160,11 +2171,11 @@ ABC9A2CA505DB49DE0FB28DD /* WalletTokenBalanceCustomAmountCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AD448DC071D8800C6B12 /* WalletTokenBalanceCustomAmountCell.swift */; }; ABC9A2D0ACEDCFA5FDB04D89 /* IndicatorDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A12E4155640075755699 /* IndicatorDataSource.swift */; }; ABC9A2D3D28955B8AD82AFC3 /* BackupTypeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A5CDF9153AECED3DE50C /* BackupTypeView.swift */; }; + ABC9A2E2F6D884CC8444C029 /* WCSignMessageHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A0643C6E6FA30D7EE473 /* WCSignMessageHandler.swift */; }; ABC9A2E71264B12B7FFC3736 /* WalletConnectListService.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A3BEB33F6DBE2395FD11 /* WalletConnectListService.swift */; }; ABC9A2E921AE00E0AF5067DE /* CoinProChartModule.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A021D71EDD24DFB6BA62 /* CoinProChartModule.swift */; }; ABC9A2EEC77205793C21F9A1 /* WalletConnectMainPendingRequestViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A8D8072033A5AC7E4897 /* WalletConnectMainPendingRequestViewModel.swift */; }; ABC9A2F6D2A2AAFA31C64BAB /* RestoreFileConfigurationViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AF6C15800AF8C37C3516 /* RestoreFileConfigurationViewModel.swift */; }; - ABC9A2FF431ACFA812F58AD1 /* WalletConnectRequestMapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AA31438063F7AB7BDDC8 /* WalletConnectRequestMapper.swift */; }; ABC9A305CBB28F2B19EB00D2 /* CoinDetailAdviceViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A10A83A43DCAFA709472 /* CoinDetailAdviceViewController.swift */; }; ABC9A30629619D5BD6CEB952 /* ContactBookContactViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A8A353E491AAD3EDA120 /* ContactBookContactViewController.swift */; }; ABC9A307AAD83C3ED0D591C7 /* ContactBookContactModule.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AB2ED4E48D4FCEDBE769 /* ContactBookContactModule.swift */; }; @@ -2187,6 +2198,7 @@ ABC9A372F53F1F1D59BF8969 /* RestoreFileConfigurationModule.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9ADA345301F29B947F281 /* RestoreFileConfigurationModule.swift */; }; ABC9A37B5FAB65E7AB66547E /* BackupManagerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AEA4B072067A9F10BE36 /* BackupManagerViewController.swift */; }; ABC9A37FB71FA7DA14553EFC /* RawFullBackup.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A819E6708797C571CA0B /* RawFullBackup.swift */; }; + ABC9A38390F78983E4DBD25D /* Eip155ProposalHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9ACED8C1A430EB4EB097F /* Eip155ProposalHandler.swift */; }; ABC9A395A96C1F7C30F21940 /* WalletConnectPendingRequestsService.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AD3F677671FB57CCD886 /* WalletConnectPendingRequestsService.swift */; }; ABC9A3B155B3F6E7E0F2CB07 /* HudHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A381CB4C09FF7CB62A94 /* HudHelper.swift */; }; ABC9A3BC9A18F74818EF5C17 /* MetadataMonitor.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AA2491ADC4E5E089CD42 /* MetadataMonitor.swift */; }; @@ -2201,10 +2213,14 @@ ABC9A4045F498EE345B998D8 /* IntegerFormAmountInputView.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AB9077A6A0ABE4909B76 /* IntegerFormAmountInputView.swift */; }; ABC9A40EB6EC886116806130 /* WalletConnectSessionManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AC0B5943DF3B61B20BF6 /* WalletConnectSessionManager.swift */; }; ABC9A414F0F0AEA6E4DD4E9D /* RestorePassphraseModule.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A39A33712A1429D623D5 /* RestorePassphraseModule.swift */; }; + ABC9A41B8484D568EEAD72AE /* WalletConnectChain.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AB3C230E3289C206ED9C /* WalletConnectChain.swift */; }; ABC9A427B3166B8A0630EC8A /* WalletTokenBalanceViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A52822CE6B8830CF5EF4 /* WalletTokenBalanceViewModel.swift */; }; + ABC9A436F7B4A40DED7F9164 /* WCEthereumTransactionPayload.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AB05E1D374DB3454F9B2 /* WCEthereumTransactionPayload.swift */; }; ABC9A437473D0E77F9DBEB42 /* RestoreAppViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AF1626FA59BD8CA7ABC1 /* RestoreAppViewModel.swift */; }; ABC9A4387AF9D012498DF42B /* NftAssetOverviewViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AB8907B0E779CA4DF8F1 /* NftAssetOverviewViewModel.swift */; }; + ABC9A43B0EDD9BB6291F2E46 /* WCRequestPayload.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A8E515FB42EDE9ABD7DE /* WCRequestPayload.swift */; }; ABC9A4465982823773CE1B50 /* BackupDisclaimerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AFFD435E0C9FBE0E5E7C /* BackupDisclaimerView.swift */; }; + ABC9A449BE71D70D4A315333 /* WCSignMessagePayload.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AF628790F13411CB3D1C /* WCSignMessagePayload.swift */; }; ABC9A453F337BA22A5698DCC /* RestorePassphraseModule.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A39A33712A1429D623D5 /* RestorePassphraseModule.swift */; }; ABC9A4566EA1995007490C0D /* SendFeeViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9ACF1ACFDFD53E2502C30 /* SendFeeViewModel.swift */; }; ABC9A458626E9C13F229741F /* WalletTokenBalanceCustomAmountCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AD448DC071D8800C6B12 /* WalletTokenBalanceCustomAmountCell.swift */; }; @@ -2216,14 +2232,15 @@ ABC9A47D4666FA5115F98629 /* ChartIndicatorsRepository.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A3758FE2D56036DF27FF /* ChartIndicatorsRepository.swift */; }; ABC9A4801E4964F6AED1E667 /* WalletConnectMainViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AEA1D717D8CED8462AB0 /* WalletConnectMainViewModel.swift */; }; ABC9A481F1C13DBAAD3F632B /* RestoreFileConfigurationViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AF6C15800AF8C37C3516 /* RestoreFileConfigurationViewModel.swift */; }; + ABC9A48C20CE22D9BAF528F3 /* WalletConnectTransaction.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AF0029A65DAB20925BDF /* WalletConnectTransaction.swift */; }; ABC9A4929EFBFAD0B595A4E8 /* RestoreCloudModule.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A45E29D1773EF27A0074 /* RestoreCloudModule.swift */; }; ABC9A4A21CFBA188A7EEC930 /* ActivityViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AF395EA01B43D6D77C43 /* ActivityViewController.swift */; }; ABC9A4B643D98FB95F431401 /* SendBitcoinAmountInputService.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9ACF1F55164BDFD049793 /* SendBitcoinAmountInputService.swift */; }; - ABC9A4B9A4CC3A9EE9A89C32 /* EventHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A950663B76424B1761B3 /* EventHandler.swift */; }; ABC9A4BD4CA7A7872CE6167E /* BaseSendViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9ABE97578DC667CBDC11A /* BaseSendViewController.swift */; }; ABC9A4CD35CF43C88EC13909 /* SendEip1155Service.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AC6A0B950C0AABD5A93E /* SendEip1155Service.swift */; }; ABC9A4D5326B3A85888140FE /* ChartIndicatorSettingsViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9ACE2CCBDF21572F5600C /* ChartIndicatorSettingsViewModel.swift */; }; ABC9A4E323FF7AAD86FA8E75 /* MarketCardView.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A37521CD6E2CC5BA4E68 /* MarketCardView.swift */; }; + ABC9A4F144A81832F29C1216 /* WCWalletPayload.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AE5B5F3F21C12DD17A95 /* WCWalletPayload.swift */; }; ABC9A4F4B7F17169DC240A98 /* WalletConnectUriHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A1C31F5343EB2BEA4540 /* WalletConnectUriHandler.swift */; }; ABC9A4FF1E1964FB77700C4E /* ChartIndicatorFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A6DE5C760A5D0C90B70E /* ChartIndicatorFactory.swift */; }; ABC9A51979D2047BEF45A2AE /* TokenSelectView.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A791A47F4F1E71B51B3B /* TokenSelectView.swift */; }; @@ -2249,8 +2266,10 @@ ABC9A5CFD2FF8B73B7AC9B8E /* WalletConnectPendingRequestsModule.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A2F6EDC8BB83ED7B75BA /* WalletConnectPendingRequestsModule.swift */; }; ABC9A5D74CE790A6DEF71777 /* WalletConnectPendingRequestsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AAD79FD756DA69A52578 /* WalletConnectPendingRequestsViewController.swift */; }; ABC9A5DB0B5E6D82560A41D8 /* WalletConnectMainModule.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AE8A193F58021C411311 /* WalletConnectMainModule.swift */; }; + ABC9A5E5EFF9D46D036F52B9 /* ProposalChain.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A768C7AA282229C30409 /* ProposalChain.swift */; }; ABC9A60350DF10E0E2534216 /* SwapPriceCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AA459E123B7053EC73F0 /* SwapPriceCell.swift */; }; ABC9A60BA5DF119C7FC8A859 /* KdfParams.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A6663522498A53CF4174 /* KdfParams.swift */; }; + ABC9A60C112A25A070D40C1C /* WCWalletHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A9BCCCE1CF80E10A174C /* WCWalletHandler.swift */; }; ABC9A618B77A70D94E269D6B /* SwapInputCardView.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AC2EF759D639F6CEA256 /* SwapInputCardView.swift */; }; ABC9A621D59D9DAE28A03865 /* SendBaseService.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A48552CF0C90E22686A9 /* SendBaseService.swift */; }; ABC9A62209E284513C33DFE2 /* MarketDiscoveryCategoryService.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9ADFD9DA59BD2FB21C51B /* MarketDiscoveryCategoryService.swift */; }; @@ -2258,11 +2277,13 @@ ABC9A638E7EA1788D40FF929 /* FileManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A8CE84FA36438BE4D6B5 /* FileManager.swift */; }; ABC9A63B2AABC0414000DEC2 /* SendConfirmationViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A3AB799024C8FC2C7DD8 /* SendConfirmationViewModel.swift */; }; ABC9A63EC83A82A76E67778B /* SendNftModule.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A82A1E9AE6CC0E24756B /* SendNftModule.swift */; }; + ABC9A6424F39E24F7198B9DF /* WCSignMessagePayload.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AF628790F13411CB3D1C /* WCSignMessagePayload.swift */; }; ABC9A66D7B34C6547C2469E9 /* BackupTypeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A5CDF9153AECED3DE50C /* BackupTypeView.swift */; }; ABC9A66E5775762856F8927D /* NftAssetOverviewModule.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A90781302D793E0773CB /* NftAssetOverviewModule.swift */; }; ABC9A67A87DFB11102AB607A /* SendBitcoinFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A3DC5DA5B7BFDBF72B5D /* SendBitcoinFactory.swift */; }; ABC9A67C2D782AD0DFDF0C3C /* RestoreFileConfigurationViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A9CB516D0B925DE22C1E /* RestoreFileConfigurationViewController.swift */; }; ABC9A6887B716464A5813EE9 /* BackupCrypto.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AAEA86EF9D14503A4791 /* BackupCrypto.swift */; }; + ABC9A6904E4DAE4C34EAEAE7 /* WCRequestPayload.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A8E515FB42EDE9ABD7DE /* WCRequestPayload.swift */; }; ABC9A69264C2086E4B3B09D2 /* WalletTokenBalanceService.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A352F3EAA38107897CEF /* WalletTokenBalanceService.swift */; }; ABC9A69A1A01DBD07CAAC9CD /* ContactBookAddressViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A55B0E99C1DD25839EDB /* ContactBookAddressViewController.swift */; }; ABC9A69BADD39C6E9239A2A1 /* SendViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AAF2ADD900F32D87C7BE /* SendViewModel.swift */; }; @@ -2278,6 +2299,7 @@ ABC9A6D1CDF470FB73EF4816 /* WalletConnectPairingService.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A56ED1DB109A2E1F6EC1 /* WalletConnectPairingService.swift */; }; ABC9A6E939BDC0269313A66D /* SendModule.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AD1F2311CC6425CF9D90 /* SendModule.swift */; }; ABC9A6EFD77E59AA6B4C5070 /* RestorePassphraseService.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AE5CAD06644F52170C72 /* RestorePassphraseService.swift */; }; + ABC9A6F265D51BD94CB43209 /* WCWalletHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A9BCCCE1CF80E10A174C /* WCWalletHandler.swift */; }; ABC9A6F88E51293F2605CACD /* ContactBookContactModule.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AB2ED4E48D4FCEDBE769 /* ContactBookContactModule.swift */; }; ABC9A70AE588307EA1D3A414 /* SendConfirmationService.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A2FD4A59DB53631435BA /* SendConfirmationService.swift */; }; ABC9A712F6389F5C2B0D63E3 /* RestoreCloudService.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A06866150862CEDEB5DE /* RestoreCloudService.swift */; }; @@ -2285,7 +2307,6 @@ ABC9A728EEF4A054C7B8722B /* DonateAddressModule.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A0B7E7360DC0357B2D0F /* DonateAddressModule.swift */; }; ABC9A7297650FD2D9F8F595F /* MacdIndicatorDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AA8F31619609907AD67E /* MacdIndicatorDataSource.swift */; }; ABC9A733703BD9E28B90BECD /* MaIndicatorDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AD2E1F25A5CED10DB81F /* MaIndicatorDataSource.swift */; }; - ABC9A736DDFBF98473C065F7 /* WalletConnectRequestMapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AA31438063F7AB7BDDC8 /* WalletConnectRequestMapper.swift */; }; ABC9A739B2E6FC4DFBD3ABC9 /* UniswapV3Module.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A6363DB5DAE5B58AFDC0 /* UniswapV3Module.swift */; }; ABC9A74F192AB94CFD1D1649 /* IndicatorAdviceCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AACC40370E1E0CFC7639 /* IndicatorAdviceCell.swift */; }; ABC9A75740E0048A695C36E8 /* WalletTokenService.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A38082BD2EBE1BC8E11E /* WalletTokenService.swift */; }; @@ -2293,6 +2314,7 @@ ABC9A7655AE66379E42FE2A4 /* ContactBookSettingsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A99184EE1D5D052C52E9 /* ContactBookSettingsViewController.swift */; }; ABC9A767A49B686B3A3AC154 /* UniswapV3Module.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A6363DB5DAE5B58AFDC0 /* UniswapV3Module.swift */; }; ABC9A774500F8D8D3D9E04DD /* SendBitcoinAdapterService.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A1BD3B1B53C72DDF923A /* SendBitcoinAdapterService.swift */; }; + ABC9A784C59999B2F7D2DEAF /* WalletConnectChain.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AB3C230E3289C206ED9C /* WalletConnectChain.swift */; }; ABC9A78CFF8B232D330EC7B5 /* DiffLabel.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A916C64B5EA9D96B8FDA /* DiffLabel.swift */; }; ABC9A78D3A4267CAC0F5D0E8 /* SendConfirmationModule.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AFF7119B9AC0E32B2060 /* SendConfirmationModule.swift */; }; ABC9A794E47FC07ABFC32BBD /* FeePriceScale.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AF8E8DE67732371A00E0 /* FeePriceScale.swift */; }; @@ -2310,6 +2332,7 @@ ABC9A802418438F6BD1FC1E3 /* WalletTokenViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A64A66778C137FA9642C /* WalletTokenViewController.swift */; }; ABC9A80BCDA72347C6619E6C /* SendTimeLockErrorService.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9ADF114FCFABEA148AF04 /* SendTimeLockErrorService.swift */; }; ABC9A819DDAEE683FCCA02EF /* NftAssetCellFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A30A8F78E9C9AEE861F1 /* NftAssetCellFactory.swift */; }; + ABC9A82C93C9E266D1AFD1C3 /* WalletConnectTransaction.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AF0029A65DAB20925BDF /* WalletConnectTransaction.swift */; }; ABC9A82D771D920162551294 /* WalletConnectPendingRequestsViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AE15C187118DE6F0CE7B /* WalletConnectPendingRequestsViewModel.swift */; }; ABC9A83233DA4C83AF83E483 /* WalletConnectPendingRequestsService.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AD3F677671FB57CCD886 /* WalletConnectPendingRequestsService.swift */; }; ABC9A8451CEF02EA0A94CEAA /* ProFeaturesAuthorizationManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A9628A708749A31EEA70 /* ProFeaturesAuthorizationManager.swift */; }; @@ -2328,10 +2351,12 @@ ABC9A8A74C527C4E01EBB8A5 /* RestoreCloudModule.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A45E29D1773EF27A0074 /* RestoreCloudModule.swift */; }; ABC9A8AC5E635D9CB1704568 /* BackupDisclaimerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AFFD435E0C9FBE0E5E7C /* BackupDisclaimerView.swift */; }; ABC9A8AE39B8925B28B97F77 /* AppBackupProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AB61EA3B39D8BDB1EEDE /* AppBackupProvider.swift */; }; + ABC9A8CB0A676BEFF303E78B /* WCSignMessageHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A0643C6E6FA30D7EE473 /* WCSignMessageHandler.swift */; }; ABC9A8CBDB7CF4E781896C49 /* RestoreTypeModule.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AAC741F9A54293CD21B1 /* RestoreTypeModule.swift */; }; ABC9A8D215CC5D6A70736E84 /* SendBaseService.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A48552CF0C90E22686A9 /* SendBaseService.swift */; }; ABC9A8D8709EC2B40D74A97A /* SwapRevokeConfirmationViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A1360FE305343B1049CF /* SwapRevokeConfirmationViewController.swift */; }; ABC9A8D91CFED1961B618241 /* ChartIndicatorsService.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A2F3E5147E0E92258FBB /* ChartIndicatorsService.swift */; }; + ABC9A8F14BF1F645F1DEB04A /* Eip155RequestFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A6D3F5BA199C53A5D955 /* Eip155RequestFactory.swift */; }; ABC9A8FAB37E2049DC58FF14 /* RestoreTypeViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A13DB598B22516E5AD76 /* RestoreTypeViewModel.swift */; }; ABC9A904FCE6BFE793C944AE /* RestoreFileConfigurationModule.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9ADA345301F29B947F281 /* RestoreFileConfigurationModule.swift */; }; ABC9A90978E16ABC5F67CCF7 /* BalanceButtonsCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A53F8E3F9572FFEE4275 /* BalanceButtonsCell.swift */; }; @@ -2339,6 +2364,7 @@ ABC9A91D03FB46F6AD21EEF4 /* WalletConnectSocketConnectionService.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A0483AEAEB88DFBDD873 /* WalletConnectSocketConnectionService.swift */; }; ABC9A9221E4FF0734089BCAB /* WalletConnectMainPendingRequestService.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AFF8093DEB7AFD7DBBCC /* WalletConnectMainPendingRequestService.swift */; }; ABC9A92D7F9ADCE00CBCED09 /* WalletConnectPairingViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AE62C0399849EFB5C158 /* WalletConnectPairingViewModel.swift */; }; + ABC9A932AD114A779BF4EC16 /* Eip155RequestFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A6D3F5BA199C53A5D955 /* Eip155RequestFactory.swift */; }; ABC9A933C2603486BA181B19 /* SendFeeService.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9ADB77831DCB474B24C8A /* SendFeeService.swift */; }; ABC9A93E05AAF5D98C1DF4D6 /* RestorePassphraseService.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AE5CAD06644F52170C72 /* RestorePassphraseService.swift */; }; ABC9A9493F250B81E1152012 /* SendBitcoinService.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A696DCBBE4761E77311C /* SendBitcoinService.swift */; }; @@ -2354,6 +2380,7 @@ ABC9A9AC7890BE4AAE7DDC84 /* WalletConnectSessionManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AC0B5943DF3B61B20BF6 /* WalletConnectSessionManager.swift */; }; ABC9A9CDDC14BA6259450ECA /* WalletConnectPairingModule.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A4BA46EDEEAB6CD9B25C /* WalletConnectPairingModule.swift */; }; ABC9A9CF9BC0D1D10C291FDD /* UIViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AB69D8053840476C26FA /* UIViewController.swift */; }; + ABC9A9DFE387DE03A693A06A /* ProposalValidator.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AE997CF6814BA9EAA6BB /* ProposalValidator.swift */; }; ABC9A9E3191338CD0D1DE8AE /* WalletConnectModule.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A0F966294A4E629CCB65 /* WalletConnectModule.swift */; }; ABC9A9EBBC60A709836DE237 /* NftAssetViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AF9C0D0174A5B6A91F13 /* NftAssetViewController.swift */; }; ABC9A9FA3285B39D25801C2A /* AccountRestoreWarningManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A7D665A025E95697C757 /* AccountRestoreWarningManager.swift */; }; @@ -2364,7 +2391,6 @@ ABC9AA27A709AC5F85176A53 /* WalletConnectModule.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A0F966294A4E629CCB65 /* WalletConnectModule.swift */; }; ABC9AA309248821942E78740 /* MarketCardCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A2B7FBA735A76083990C /* MarketCardCell.swift */; }; ABC9AA39ED35D6EF41A5353D /* SettingsBackup.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AA7FC181E0E0FB74BEF5 /* SettingsBackup.swift */; }; - ABC9AA462C94586CD8233295 /* WalletConnectAppShowModule.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A9E2C039C005650491D2 /* WalletConnectAppShowModule.swift */; }; ABC9AA4B0A6C33CAD5F3B050 /* ChartIndicatorsModule.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AB3EC7A1FB0D6C9F7F89 /* ChartIndicatorsModule.swift */; }; ABC9AA78419B8BFEC23E8E02 /* TokenSelectView.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A791A47F4F1E71B51B3B /* TokenSelectView.swift */; }; ABC9AA802C533F489EB72FDE /* RestoreManagerViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A999428368A8FA264CA4 /* RestoreManagerViewModel.swift */; }; @@ -2382,18 +2408,20 @@ ABC9AB11FDD018A96BB86557 /* BottomGradientHolder.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9ADE822BC024F9B798211 /* BottomGradientHolder.swift */; }; ABC9AB1E703AE57DF856ECD9 /* SendAmountCautionViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A07A33870908ED1BA338 /* SendAmountCautionViewModel.swift */; }; ABC9AB215D081976FC2E294F /* BackupNameView.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A7AC6BC7EA8166F21D9A /* BackupNameView.swift */; }; + ABC9AB27C7AA17FA3D38D912 /* WCEthereumTransactionPayload.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AB05E1D374DB3454F9B2 /* WCEthereumTransactionPayload.swift */; }; ABC9AB2E235EA006E2DAD8DD /* EnabledWalletCache_v_0_36.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A68AFE3CF24D2B88808F /* EnabledWalletCache_v_0_36.swift */; }; ABC9AB308727D81FBB8EBCDD /* BackupCloudPassphraseService.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AF6AA02DA39787C053F0 /* BackupCloudPassphraseService.swift */; }; ABC9AB3DAD30AA400DEB719C /* SendBitcoinService.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A696DCBBE4761E77311C /* SendBitcoinService.swift */; }; ABC9AB401FD98F99EF6B07C6 /* RestoreTypeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A939DD222D4A2BD3D71C /* RestoreTypeViewController.swift */; }; ABC9AB4DF4CCEA2C51DD4AB6 /* SingleLineFormTextView.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A03401172C4C65D66764 /* SingleLineFormTextView.swift */; }; ABC9AB6EB596E2F8B15D00E4 /* CipherParams.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A89726499CDB4F697EDD /* CipherParams.swift */; }; - ABC9AB71563E5F2C9F2EA9E4 /* WalletConnectAppShowViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A3FB680357E569B6DB5F /* WalletConnectAppShowViewModel.swift */; }; ABC9AB83EE3F909BD80E0539 /* BackupCryptoHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AD5CB1911A698718213F /* BackupCryptoHelper.swift */; }; ABC9AB86218564E4873F6428 /* WalletConnectUriHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A1C31F5343EB2BEA4540 /* WalletConnectUriHandler.swift */; }; ABC9AB8A9028DC1488166ABC /* WalletConnectPendingRequestsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AAD79FD756DA69A52578 /* WalletConnectPendingRequestsViewController.swift */; }; + ABC9AB92AA6E6B239B147FA7 /* ProposalChain.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A768C7AA282229C30409 /* ProposalChain.swift */; }; ABC9AB9DCC782F2EC14A7031 /* TechnicalIndicatorService.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A3EE670713BA4B6110F4 /* TechnicalIndicatorService.swift */; }; ABC9ABA70CEF664E8E01FA7A /* SendNftModule.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A82A1E9AE6CC0E24756B /* SendNftModule.swift */; }; + ABC9ABBE120DB35A597FFE44 /* Encodable.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A3DFC1E03CB2E6C12F2C /* Encodable.swift */; }; ABC9ABC09321233E1727A8DD /* WalletConnectSession.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A4544AB5CA22ADE16417 /* WalletConnectSession.swift */; }; ABC9ABC375B65451761D4766 /* SendFeeViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9ACF1ACFDFD53E2502C30 /* SendFeeViewModel.swift */; }; ABC9ABD7C7746ABF50DD646F /* ChartIndicatorFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A6DE5C760A5D0C90B70E /* ChartIndicatorFactory.swift */; }; @@ -2409,21 +2437,20 @@ ABC9AC10D815702B812CFFB7 /* NftAssetOverviewService.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9ABE473B354836327B3AC /* NftAssetOverviewService.swift */; }; ABC9AC170807B409634706E6 /* BackupManagerModule.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AD42C324F58B5EE00610 /* BackupManagerModule.swift */; }; ABC9AC1BD5C95957726F8AE8 /* MarketCardValueView.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A4FCDC5085002DF35C17 /* MarketCardValueView.swift */; }; + ABC9AC2A8C8117EBE76078DE /* WCWalletPayload.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AE5B5F3F21C12DD17A95 /* WCWalletPayload.swift */; }; ABC9AC50E2E966F009D78FD5 /* CheckboxView.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A6B2EF46FF7EDA4728D3 /* CheckboxView.swift */; }; ABC9AC5552508D091D622027 /* SendZcashFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A6F55A2C6777D25F57D5 /* SendZcashFactory.swift */; }; ABC9AC55F33A3BFBDBCD5580 /* SendEip1155AvailableBalanceViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AB612DE3C8AA3A1EEAC7 /* SendEip1155AvailableBalanceViewModel.swift */; }; ABC9AC5671A5EA9BF5ACBC5D /* NoAccountWalletTokenListService.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A141E4C255C3E450863E /* NoAccountWalletTokenListService.swift */; }; + ABC9AC5C5D51D703D7867211 /* WalletConnectRequestHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A88CFC0598CD6D780AC2 /* WalletConnectRequestHandler.swift */; }; ABC9AC5C8EE0A8C7F10B8A50 /* ContactBookSettingsService.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A309A58148C40912B964 /* ContactBookSettingsService.swift */; }; ABC9AC692F695C5F81E0453D /* DonateAddressViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A525C1E9A53F37EC3918 /* DonateAddressViewController.swift */; }; ABC9AC73C488F8B1F54929B5 /* NftAssetCellFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A30A8F78E9C9AEE861F1 /* NftAssetCellFactory.swift */; }; ABC9AC763748CC31D45FB6BD /* BackupAppViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AB001077F4001611DFFC /* BackupAppViewModel.swift */; }; - ABC9AC78B2D374511F751997 /* WalletConnectAppShowViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A3FB680357E569B6DB5F /* WalletConnectAppShowViewModel.swift */; }; - ABC9AC79493AB0EC96904164 /* SessionRequestFilterManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AA77C414AC06C41F9319 /* SessionRequestFilterManager.swift */; }; ABC9AC79ACCB69BF97A01B53 /* ContactBookSettingsViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A06A4A02C5E889265463 /* ContactBookSettingsViewModel.swift */; }; ABC9AC7B5E1E2EE48117EFC4 /* BalanceButtonsCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A53F8E3F9572FFEE4275 /* BalanceButtonsCell.swift */; }; ABC9AC839A67BDEABD24CD7A /* SendMemoInputCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A3C103C1DE359184D944 /* SendMemoInputCell.swift */; }; ABC9AC84790F5BEAA514C731 /* TransactionsContactLabelService.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AE89A5925C2026AB6B69 /* TransactionsContactLabelService.swift */; }; - ABC9AC850D83253B2B6FBD0A /* WalletConnectAppShowView.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A845B2969166028BA5F0 /* WalletConnectAppShowView.swift */; }; ABC9AC87FA11BA3478A8E801 /* TransactionsContactLabelService.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AE89A5925C2026AB6B69 /* TransactionsContactLabelService.swift */; }; ABC9AC8ACB374C9B96F05B3C /* WalletTokenBalanceModule.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A1833D302B63028A3966 /* WalletTokenBalanceModule.swift */; }; ABC9AC900545DC0DD2201DEE /* UniswapV3TradeService.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9ACF418357FF7AFC64B3F /* UniswapV3TradeService.swift */; }; @@ -2456,15 +2483,14 @@ ABC9AD49CCD14F97CD912454 /* SendBitcoinAdapterService.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A1BD3B1B53C72DDF923A /* SendBitcoinAdapterService.swift */; }; ABC9AD565E3BAB7074D02D40 /* ProFeaturesAuthorizationAdapter.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A8D3446ABE98F4D1C0CC /* ProFeaturesAuthorizationAdapter.swift */; }; ABC9AD6C3EE6EDD0FB3D623A /* ContactBookViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A3C708CD81CFE4C5BC5C /* ContactBookViewModel.swift */; }; - ABC9AD7C556CD68024FBEDF7 /* WalletConnectAppShowModule.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A9E2C039C005650491D2 /* WalletConnectAppShowModule.swift */; }; ABC9AD841550A5A686BE72C3 /* WalletTokenViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A8D48B40400D645C5496 /* WalletTokenViewModel.swift */; }; ABC9AD85EF6798DF4302FD0E /* WalletTokenListDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A3FBE68E228E3BE66F7B /* WalletTokenListDataSource.swift */; }; + ABC9AD900F508E6A1FD96662 /* WCEthereumTransactionHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9ABC82FDCC360FDF9CC72 /* WCEthereumTransactionHandler.swift */; }; ABC9ADAAB5CC80BBE7E1D9FE /* WalletConnectPairingViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AE62C0399849EFB5C158 /* WalletConnectPairingViewModel.swift */; }; ABC9ADCAB9BB8D2144F8D3CC /* SendConfirmationViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AA7F2ECF212EF8B70470 /* SendConfirmationViewController.swift */; }; ABC9ADCDC949C4C63D1260DE /* WalletConnectListViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A52AC277ED7563F2707F /* WalletConnectListViewModel.swift */; }; ABC9ADD1A3E8C0B54E0B5014 /* IntegerAmountInputView.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A88E126AB21F856522A7 /* IntegerAmountInputView.swift */; }; ABC9ADD2EA3745F828763EB4 /* ContactBookService.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AC4A19838CA08603E17B /* ContactBookService.swift */; }; - ABC9ADD2F99F8C6A6C346FCC /* WalletConnectAppShowService.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AA3B8927F9F138ABCFB8 /* WalletConnectAppShowService.swift */; }; ABC9ADDC1F55F835C68DB4C7 /* UniswapV3Provider.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A253877D9FB972EFB8D7 /* UniswapV3Provider.swift */; }; ABC9ADDF8BF51151BDB4D513 /* WalletConnectPendingRequestsViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AE15C187118DE6F0CE7B /* WalletConnectPendingRequestsViewModel.swift */; }; ABC9ADE1C8B18509F080FD11 /* ProFeaturesStorage.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AB785128005F6C2C9F9A /* ProFeaturesStorage.swift */; }; @@ -2490,7 +2516,6 @@ ABC9AE51262C09EABF5CCEEE /* InputTextView.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9ACEC3169A9F01B55921A /* InputTextView.swift */; }; ABC9AE553D422A163A09E5F8 /* MarketCardValueView.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A4FCDC5085002DF35C17 /* MarketCardValueView.swift */; }; ABC9AE6D877341985A6F651F /* SendBitcoinAmountInputService.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9ACF1F55164BDFD049793 /* SendBitcoinAmountInputService.swift */; }; - ABC9AE775BB25CDB7AA83228 /* EventHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A950663B76424B1761B3 /* EventHandler.swift */; }; ABC9AE7DA8EFD812710C7BE4 /* RestorePassphraseViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AE8D5944EB202A471C80 /* RestorePassphraseViewModel.swift */; }; ABC9AE832E74D8DCADB83803 /* ImageCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A7FC41B9F98871246E0E /* ImageCell.swift */; }; ABC9AE863B44E921F58DF3EA /* WalletConnectMainViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A3A694467493C6F4AACE /* WalletConnectMainViewController.swift */; }; @@ -2499,6 +2524,7 @@ ABC9AEA5C042362B5B5BE81C /* WalletConnectMainModule.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AE8A193F58021C411311 /* WalletConnectMainModule.swift */; }; ABC9AEA715281555878BF2A9 /* BackupCrypto.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AAEA86EF9D14503A4791 /* BackupCrypto.swift */; }; ABC9AEAA851D9BB91E8338D1 /* SwapInputAccessoryView.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A56611CF5E7B3F25CD5C /* SwapInputAccessoryView.swift */; }; + ABC9AEAAB96049FCD4F4F67D /* WCEthereumTransactionHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9ABC82FDCC360FDF9CC72 /* WCEthereumTransactionHandler.swift */; }; ABC9AEB71EB75575A97408BC /* DonateDescriptionDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9ABFE62D22F9FB0B3409A /* DonateDescriptionDataSource.swift */; }; ABC9AEC9C350F3CD059C9716 /* SendMemoInputService.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9A80143F95E28346C81FE /* SendMemoInputService.swift */; }; ABC9AECE6AD4A9DEA41DDBD9 /* ProChartFetcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC9AAB6BA03FFE92F247FF6 /* ProChartFetcher.swift */; }; @@ -2837,9 +2863,7 @@ D3948F2F2ADA8CD500FAE566 /* HsToolKit in Frameworks */ = {isa = PBXBuildFile; productRef = D3948F2E2ADA8CD500FAE566 /* HsToolKit */; }; D3993DA528F4229F008720FB /* ZcashLightClientKit in Frameworks */ = {isa = PBXBuildFile; productRef = D3993DA428F4229F008720FB /* ZcashLightClientKit */; }; D3993DA728F422BD008720FB /* ZcashLightClientKit in Frameworks */ = {isa = PBXBuildFile; productRef = D3993DA628F422BD008720FB /* ZcashLightClientKit */; }; - D3993DAE28F4256F008720FB /* WalletConnectV1 in Frameworks */ = {isa = PBXBuildFile; productRef = D3993DAD28F4256F008720FB /* WalletConnectV1 */; }; D3993DB028F4256F008720FB /* WalletConnect in Frameworks */ = {isa = PBXBuildFile; productRef = D3993DAF28F4256F008720FB /* WalletConnect */; }; - D3993DB628F42595008720FB /* WalletConnectV1 in Frameworks */ = {isa = PBXBuildFile; productRef = D3993DB528F42595008720FB /* WalletConnectV1 */; }; D3993DB828F42595008720FB /* WalletConnect in Frameworks */ = {isa = PBXBuildFile; productRef = D3993DB728F42595008720FB /* WalletConnect */; }; D3993DBB28F4277E008720FB /* ActionSheet in Frameworks */ = {isa = PBXBuildFile; productRef = D3993DBA28F4277E008720FB /* ActionSheet */; }; D3993DBD28F4278F008720FB /* ActionSheet in Frameworks */ = {isa = PBXBuildFile; productRef = D3993DBC28F4278F008720FB /* ActionSheet */; }; @@ -3251,7 +3275,6 @@ 11B356A734526DECD9606A66 /* AccountRecord_v_0_36.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AccountRecord_v_0_36.swift; sourceTree = ""; }; 11B356B9F833E1AEE0D6D589 /* CexDepositService.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CexDepositService.swift; sourceTree = ""; }; 11B356BEB2B4DFC3E9C950C5 /* MarketAdvancedSearchViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MarketAdvancedSearchViewModel.swift; sourceTree = ""; }; - 11B356C2E5AF8ED41E2B545D /* WalletConnectRequestModule.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WalletConnectRequestModule.swift; sourceTree = ""; }; 11B356D15E318829D9C7F5F1 /* EvmBlockchainManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EvmBlockchainManager.swift; sourceTree = ""; }; 11B356D5A5F32E88FEC7629D /* AddTokenViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AddTokenViewController.swift; sourceTree = ""; }; 11B356D6300E64A1982BC9EB /* UIAlertController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UIAlertController.swift; sourceTree = ""; }; @@ -3444,7 +3467,6 @@ 11B35A8342513D5834B2145A /* ManageAccountsViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ManageAccountsViewModel.swift; sourceTree = ""; }; 11B35A8370C726989F4F456E /* WatchEvmAddressViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WatchEvmAddressViewModel.swift; sourceTree = ""; }; 11B35A9DB4112F41D7FCAC12 /* PrivateKeysViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PrivateKeysViewModel.swift; sourceTree = ""; }; - 11B35A9F154EC84CEFA909B9 /* WalletConnectInteractor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WalletConnectInteractor.swift; sourceTree = ""; }; 11B35AA1093600AF7B08362D /* RestoreSelectService.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RestoreSelectService.swift; sourceTree = ""; }; 11B35AA43C4832521D428799 /* ListSection.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ListSection.swift; sourceTree = ""; }; 11B35AAAC675987369F2DA1B /* BinanceAdapter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BinanceAdapter.swift; sourceTree = ""; }; @@ -4002,7 +4024,12 @@ 58AAAFF6E494F623AD62AF95 /* UniswapSettingsService.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UniswapSettingsService.swift; sourceTree = ""; }; 6B146A932A52A69400648C10 /* ChartIndicatorSettingsViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChartIndicatorSettingsViewController.swift; sourceTree = ""; }; 6B146A952A52A69400648C10 /* ChartIndicatorSettingsModule.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChartIndicatorSettingsModule.swift; sourceTree = ""; }; - 6BC3B11B2AE683F900B8E562 /* WidgetCoinAppShowModule.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WidgetCoinAppShowModule.swift; sourceTree = ""; }; + 6B2907182AF0CB8A006157D6 /* WalletConnectAppShowService.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WalletConnectAppShowService.swift; sourceTree = ""; }; + 6B2907192AF0CB8A006157D6 /* WalletConnectAppShowModule.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WalletConnectAppShowModule.swift; sourceTree = ""; }; + 6B29071A2AF0CB8A006157D6 /* WalletConnectAppShowViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WalletConnectAppShowViewModel.swift; sourceTree = ""; }; + 6B29071B2AF0CB8A006157D6 /* WalletConnectAppShowView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WalletConnectAppShowView.swift; sourceTree = ""; }; + 6B29071D2AF0CB8A006157D6 /* WidgetCoinAppShowModule.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WidgetCoinAppShowModule.swift; sourceTree = ""; }; + 6B29071E2AF0CB8A006157D6 /* EventHandler.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EventHandler.swift; sourceTree = ""; }; 6BCD52F72A161F4100993F20 /* BackupCloudModule.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BackupCloudModule.swift; sourceTree = ""; }; 6BCD52F92A161F4100993F20 /* ICloudBackupTermsViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ICloudBackupTermsViewModel.swift; sourceTree = ""; }; 6BCD52FA2A161F4100993F20 /* ICloudBackupTermsViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ICloudBackupTermsViewController.swift; sourceTree = ""; }; @@ -4022,6 +4049,7 @@ ABC9A044BFF4E76CD17835CA /* IndicatorAdviceView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IndicatorAdviceView.swift; sourceTree = ""; }; ABC9A0483AEAEB88DFBDD873 /* WalletConnectSocketConnectionService.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WalletConnectSocketConnectionService.swift; sourceTree = ""; }; ABC9A0547CBE2B5A3E38891E /* RestorePassphraseViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RestorePassphraseViewController.swift; sourceTree = ""; }; + ABC9A0643C6E6FA30D7EE473 /* WCSignMessageHandler.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WCSignMessageHandler.swift; sourceTree = ""; }; ABC9A06866150862CEDEB5DE /* RestoreCloudService.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RestoreCloudService.swift; sourceTree = ""; }; ABC9A06A4A02C5E889265463 /* ContactBookSettingsViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ContactBookSettingsViewModel.swift; sourceTree = ""; }; ABC9A06A64AB5B2A12C38D91 /* Array.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Array.swift; sourceTree = ""; }; @@ -4073,9 +4101,9 @@ ABC9A3C708CD81CFE4C5BC5C /* ContactBookViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ContactBookViewModel.swift; sourceTree = ""; }; ABC9A3DBB89D0AE0C127742B /* WalletConnectScanQrViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WalletConnectScanQrViewModel.swift; sourceTree = ""; }; ABC9A3DC5DA5B7BFDBF72B5D /* SendBitcoinFactory.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SendBitcoinFactory.swift; sourceTree = ""; }; + ABC9A3DFC1E03CB2E6C12F2C /* Encodable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Encodable.swift; sourceTree = ""; }; ABC9A3EE670713BA4B6110F4 /* TechnicalIndicatorService.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TechnicalIndicatorService.swift; sourceTree = ""; }; ABC9A3F41BDCD5F4146E6E06 /* SendBinanceService.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SendBinanceService.swift; sourceTree = ""; }; - ABC9A3FB680357E569B6DB5F /* WalletConnectAppShowViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = WalletConnectAppShowViewModel.swift; path = ../../../Main/Workers/WalletConnectAppShowWorker/WalletConnectAppShowViewModel.swift; sourceTree = ""; }; ABC9A3FBE68E228E3BE66F7B /* WalletTokenListDataSource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WalletTokenListDataSource.swift; sourceTree = ""; }; ABC9A41F6AA0B65FDA91EB68 /* FullBackup.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FullBackup.swift; sourceTree = ""; }; ABC9A4544AB5CA22ADE16417 /* WalletConnectSession.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WalletConnectSession.swift; sourceTree = ""; }; @@ -4107,12 +4135,14 @@ ABC9A696DCBBE4761E77311C /* SendBitcoinService.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SendBitcoinService.swift; sourceTree = ""; }; ABC9A6B2EF46FF7EDA4728D3 /* CheckboxView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CheckboxView.swift; sourceTree = ""; }; ABC9A6CFDF38D413679D2088 /* ManageBarButtonView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ManageBarButtonView.swift; sourceTree = ""; }; + ABC9A6D3F5BA199C53A5D955 /* Eip155RequestFactory.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Eip155RequestFactory.swift; sourceTree = ""; }; ABC9A6D56EBB7FFAD68CFD66 /* IntegerAmountInputViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IntegerAmountInputViewModel.swift; sourceTree = ""; }; ABC9A6DE5C760A5D0C90B70E /* ChartIndicatorFactory.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChartIndicatorFactory.swift; sourceTree = ""; }; ABC9A6F55A2C6777D25F57D5 /* SendZcashFactory.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SendZcashFactory.swift; sourceTree = ""; }; ABC9A72B62F6152709348A6D /* DonateAddressViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DonateAddressViewModel.swift; sourceTree = ""; }; ABC9A7315E119F0B1581B70C /* SendEip721ViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SendEip721ViewController.swift; sourceTree = ""; }; ABC9A76776AD840DBFAA1804 /* CoinIndicatorViewItemFactory.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CoinIndicatorViewItemFactory.swift; sourceTree = ""; }; + ABC9A768C7AA282229C30409 /* ProposalChain.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ProposalChain.swift; sourceTree = ""; }; ABC9A776346AF62265896CA1 /* CellElement.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CellElement.swift; sourceTree = ""; }; ABC9A791A47F4F1E71B51B3B /* TokenSelectView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TokenSelectView.swift; sourceTree = ""; }; ABC9A7AC6BC7EA8166F21D9A /* BackupNameView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BackupNameView.swift; sourceTree = ""; }; @@ -4127,8 +4157,8 @@ ABC9A819E6708797C571CA0B /* RawFullBackup.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RawFullBackup.swift; sourceTree = ""; }; ABC9A82A1E9AE6CC0E24756B /* SendNftModule.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SendNftModule.swift; sourceTree = ""; }; ABC9A830FE79DBF62FD63CC4 /* ThemeMode.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ThemeMode.swift; sourceTree = ""; }; - ABC9A845B2969166028BA5F0 /* WalletConnectAppShowView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = WalletConnectAppShowView.swift; path = ../../../Main/Workers/WalletConnectAppShowWorker/WalletConnectAppShowView.swift; sourceTree = ""; }; ABC9A86EA911DA12C7A6AC20 /* WalletTokenBalanceViewItemFactory.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WalletTokenBalanceViewItemFactory.swift; sourceTree = ""; }; + ABC9A88CFC0598CD6D780AC2 /* WalletConnectRequestHandler.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WalletConnectRequestHandler.swift; sourceTree = ""; }; ABC9A88E126AB21F856522A7 /* IntegerAmountInputView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IntegerAmountInputView.swift; sourceTree = ""; }; ABC9A896A83640B618328FE1 /* EnsAddressParserItem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EnsAddressParserItem.swift; sourceTree = ""; }; ABC9A89726499CDB4F697EDD /* CipherParams.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CipherParams.swift; sourceTree = ""; }; @@ -4141,26 +4171,23 @@ ABC9A8D48B40400D645C5496 /* WalletTokenViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WalletTokenViewModel.swift; sourceTree = ""; }; ABC9A8D8072033A5AC7E4897 /* WalletConnectMainPendingRequestViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WalletConnectMainPendingRequestViewModel.swift; sourceTree = ""; }; ABC9A8E4CDD143171A1F9C46 /* BackupCloudPassphraseViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BackupCloudPassphraseViewController.swift; sourceTree = ""; }; + ABC9A8E515FB42EDE9ABD7DE /* WCRequestPayload.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WCRequestPayload.swift; sourceTree = ""; }; ABC9A90781302D793E0773CB /* NftAssetOverviewModule.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NftAssetOverviewModule.swift; sourceTree = ""; }; ABC9A90E8831B7B909124AB2 /* SwapInputCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SwapInputCell.swift; sourceTree = ""; }; ABC9A916C64B5EA9D96B8FDA /* DiffLabel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DiffLabel.swift; sourceTree = ""; }; ABC9A939DD222D4A2BD3D71C /* RestoreTypeViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RestoreTypeViewController.swift; sourceTree = ""; }; - ABC9A950663B76424B1761B3 /* EventHandler.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = EventHandler.swift; path = ../../Main/Workers/EventHandler.swift; sourceTree = ""; }; ABC9A9628A708749A31EEA70 /* ProFeaturesAuthorizationManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ProFeaturesAuthorizationManager.swift; sourceTree = ""; }; ABC9A99184EE1D5D052C52E9 /* ContactBookSettingsViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ContactBookSettingsViewController.swift; sourceTree = ""; }; ABC9A999428368A8FA264CA4 /* RestoreManagerViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RestoreManagerViewModel.swift; sourceTree = ""; }; ABC9A9B35C58F6525F3B2D5C /* FullCoin.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FullCoin.swift; sourceTree = ""; }; + ABC9A9BCCCE1CF80E10A174C /* WCWalletHandler.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WCWalletHandler.swift; sourceTree = ""; }; ABC9A9C09ECB9B0CCBAD8C21 /* SendEip1155ViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SendEip1155ViewController.swift; sourceTree = ""; }; ABC9A9CB516D0B925DE22C1E /* RestoreFileConfigurationViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RestoreFileConfigurationViewController.swift; sourceTree = ""; }; - ABC9A9E2C039C005650491D2 /* WalletConnectAppShowModule.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = WalletConnectAppShowModule.swift; path = ../../../Main/Workers/WalletConnectAppShowWorker/WalletConnectAppShowModule.swift; sourceTree = ""; }; ABC9A9F6635146BEBFB432D1 /* ChartCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChartCell.swift; sourceTree = ""; }; ABC9AA2491ADC4E5E089CD42 /* MetadataMonitor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MetadataMonitor.swift; sourceTree = ""; }; - ABC9AA31438063F7AB7BDDC8 /* WalletConnectRequestMapper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WalletConnectRequestMapper.swift; sourceTree = ""; }; - ABC9AA3B8927F9F138ABCFB8 /* WalletConnectAppShowService.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = WalletConnectAppShowService.swift; path = ../../../Main/Workers/WalletConnectAppShowWorker/WalletConnectAppShowService.swift; sourceTree = ""; }; ABC9AA459E123B7053EC73F0 /* SwapPriceCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SwapPriceCell.swift; sourceTree = ""; }; ABC9AA527E63E18179CB689A /* IntegerAmountInputCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IntegerAmountInputCell.swift; sourceTree = ""; }; ABC9AA751C8B09F90F716231 /* RestoreCloudViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RestoreCloudViewController.swift; sourceTree = ""; }; - ABC9AA77C414AC06C41F9319 /* SessionRequestFilterManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SessionRequestFilterManager.swift; sourceTree = ""; }; ABC9AA7F2ECF212EF8B70470 /* SendConfirmationViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SendConfirmationViewController.swift; sourceTree = ""; }; ABC9AA7FC181E0E0FB74BEF5 /* SettingsBackup.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SettingsBackup.swift; sourceTree = ""; }; ABC9AA8F31619609907AD67E /* MacdIndicatorDataSource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MacdIndicatorDataSource.swift; sourceTree = ""; }; @@ -4172,9 +4199,11 @@ ABC9AAEA86EF9D14503A4791 /* BackupCrypto.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BackupCrypto.swift; sourceTree = ""; }; ABC9AAF2ADD900F32D87C7BE /* SendViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SendViewModel.swift; sourceTree = ""; }; ABC9AB001077F4001611DFFC /* BackupAppViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BackupAppViewModel.swift; sourceTree = ""; }; + ABC9AB05E1D374DB3454F9B2 /* WCEthereumTransactionPayload.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WCEthereumTransactionPayload.swift; sourceTree = ""; }; ABC9AB0A37663BC3F17C7A81 /* FileStorage.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FileStorage.swift; sourceTree = ""; }; ABC9AB2DC4C4412EFE6BEFF7 /* WalletTokenBalanceCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WalletTokenBalanceCell.swift; sourceTree = ""; }; ABC9AB2ED4E48D4FCEDBE769 /* ContactBookContactModule.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ContactBookContactModule.swift; sourceTree = ""; }; + ABC9AB3C230E3289C206ED9C /* WalletConnectChain.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WalletConnectChain.swift; sourceTree = ""; }; ABC9AB3EC7A1FB0D6C9F7F89 /* ChartIndicatorsModule.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChartIndicatorsModule.swift; sourceTree = ""; }; ABC9AB612DE3C8AA3A1EEAC7 /* SendEip1155AvailableBalanceViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SendEip1155AvailableBalanceViewModel.swift; sourceTree = ""; }; ABC9AB61774389A4773BE18C /* RestoreFileHelper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RestoreFileHelper.swift; sourceTree = ""; }; @@ -4184,12 +4213,14 @@ ABC9AB8907B0E779CA4DF8F1 /* NftAssetOverviewViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NftAssetOverviewViewModel.swift; sourceTree = ""; }; ABC9AB89F64056FFB98928E7 /* ContactLabelService.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ContactLabelService.swift; sourceTree = ""; }; ABC9AB9077A6A0ABE4909B76 /* IntegerFormAmountInputView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IntegerFormAmountInputView.swift; sourceTree = ""; }; + ABC9ABC82FDCC360FDF9CC72 /* WCEthereumTransactionHandler.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WCEthereumTransactionHandler.swift; sourceTree = ""; }; ABC9ABE473B354836327B3AC /* NftAssetOverviewService.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NftAssetOverviewService.swift; sourceTree = ""; }; ABC9ABE97578DC667CBDC11A /* BaseSendViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BaseSendViewController.swift; sourceTree = ""; }; ABC9ABFE62D22F9FB0B3409A /* DonateDescriptionDataSource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DonateDescriptionDataSource.swift; sourceTree = ""; }; ABC9AC09A586D88BAB3B9C67 /* WalletConnectListModule.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WalletConnectListModule.swift; sourceTree = ""; }; ABC9AC0B5943DF3B61B20BF6 /* WalletConnectSessionManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WalletConnectSessionManager.swift; sourceTree = ""; }; ABC9AC2EF759D639F6CEA256 /* SwapInputCardView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SwapInputCardView.swift; sourceTree = ""; }; + ABC9AC335F1215FE4F79C419 /* WalletConnectRequestChain.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WalletConnectRequestChain.swift; sourceTree = ""; }; ABC9AC4A19838CA08603E17B /* ContactBookService.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ContactBookService.swift; sourceTree = ""; }; ABC9AC50307ABA3DF7034E1D /* BackupContact.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BackupContact.swift; sourceTree = ""; }; ABC9AC6A0B950C0AABD5A93E /* SendEip1155Service.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SendEip1155Service.swift; sourceTree = ""; }; @@ -4199,6 +4230,7 @@ ABC9ACE7CB7CC9C118C72559 /* SendEip721Service.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SendEip721Service.swift; sourceTree = ""; }; ABC9ACE88105815BFC477D71 /* WalletConnectPairingViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WalletConnectPairingViewController.swift; sourceTree = ""; }; ABC9ACEC3169A9F01B55921A /* InputTextView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = InputTextView.swift; sourceTree = ""; }; + ABC9ACED8C1A430EB4EB097F /* Eip155ProposalHandler.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Eip155ProposalHandler.swift; sourceTree = ""; }; ABC9ACF1ACFDFD53E2502C30 /* SendFeeViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SendFeeViewModel.swift; sourceTree = ""; }; ABC9ACF1F55164BDFD049793 /* SendBitcoinAmountInputService.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SendBitcoinAmountInputService.swift; sourceTree = ""; }; ABC9ACF418357FF7AFC64B3F /* UniswapV3TradeService.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UniswapV3TradeService.swift; sourceTree = ""; }; @@ -4221,6 +4253,7 @@ ABC9AE12A5E8B9FB24FFE42F /* ContactBookHelper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ContactBookHelper.swift; sourceTree = ""; }; ABC9AE15C187118DE6F0CE7B /* WalletConnectPendingRequestsViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WalletConnectPendingRequestsViewModel.swift; sourceTree = ""; }; ABC9AE522F09C5E7029CA86E /* CheckboxStyle.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CheckboxStyle.swift; sourceTree = ""; }; + ABC9AE5B5F3F21C12DD17A95 /* WCWalletPayload.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WCWalletPayload.swift; sourceTree = ""; }; ABC9AE5CAD06644F52170C72 /* RestorePassphraseService.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RestorePassphraseService.swift; sourceTree = ""; }; ABC9AE5FD79ECC4AC85B86FA /* WalletConnectListViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WalletConnectListViewController.swift; sourceTree = ""; }; ABC9AE62C0399849EFB5C158 /* WalletConnectPairingViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WalletConnectPairingViewModel.swift; sourceTree = ""; }; @@ -4229,16 +4262,19 @@ ABC9AE8A193F58021C411311 /* WalletConnectMainModule.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WalletConnectMainModule.swift; sourceTree = ""; }; ABC9AE8D5944EB202A471C80 /* RestorePassphraseViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RestorePassphraseViewModel.swift; sourceTree = ""; }; ABC9AE97D361FBF43F46F016 /* UniswapV3DataSource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UniswapV3DataSource.swift; sourceTree = ""; }; + ABC9AE997CF6814BA9EAA6BB /* ProposalValidator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ProposalValidator.swift; sourceTree = ""; }; ABC9AEA1D717D8CED8462AB0 /* WalletConnectMainViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WalletConnectMainViewModel.swift; sourceTree = ""; }; ABC9AEA4B072067A9F10BE36 /* BackupManagerViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BackupManagerViewController.swift; sourceTree = ""; }; ABC9AEAD18F73D4FBE05783D /* Contact.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Contact.swift; sourceTree = ""; }; ABC9AEC034DE5784F55BD5F3 /* PseudoAccessoryView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PseudoAccessoryView.swift; sourceTree = ""; }; ABC9AECEEB35D57CB0965E79 /* WalletBackup.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WalletBackup.swift; sourceTree = ""; }; + ABC9AF0029A65DAB20925BDF /* WalletConnectTransaction.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WalletConnectTransaction.swift; sourceTree = ""; }; ABC9AF15BD67548E6D755CA0 /* SendBinanceViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SendBinanceViewController.swift; sourceTree = ""; }; ABC9AF1626FA59BD8CA7ABC1 /* RestoreAppViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RestoreAppViewModel.swift; sourceTree = ""; }; ABC9AF26FDCB363793BF66E1 /* Integer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Integer.swift; sourceTree = ""; }; ABC9AF2B063727B7EABFD9A3 /* RsiIndicatorDataSource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RsiIndicatorDataSource.swift; sourceTree = ""; }; ABC9AF395EA01B43D6D77C43 /* ActivityViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ActivityViewController.swift; sourceTree = ""; }; + ABC9AF628790F13411CB3D1C /* WCSignMessagePayload.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WCSignMessagePayload.swift; sourceTree = ""; }; ABC9AF6AA02DA39787C053F0 /* BackupCloudPassphraseService.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BackupCloudPassphraseService.swift; sourceTree = ""; }; ABC9AF6C15800AF8C37C3516 /* RestoreFileConfigurationViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RestoreFileConfigurationViewModel.swift; sourceTree = ""; }; ABC9AF8E8DE67732371A00E0 /* FeePriceScale.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FeePriceScale.swift; sourceTree = ""; }; @@ -4389,7 +4425,7 @@ D3AF5A9129FFD87500C1399E /* RxRelay in Frameworks */, D3993DB028F4256F008720FB /* WalletConnect in Frameworks */, D3C187E8290FD00E00FE1900 /* SectionsTableView in Frameworks */, - D3993DAE28F4256F008720FB /* WalletConnectV1 in Frameworks */, + 6B55E33D2AF26D7A00616B60 /* Starscream in Frameworks */, D3E323C82AE7B8E400F73914 /* KeychainAccess in Frameworks */, 500F1D1327AA87D1002AA419 /* AlignedCollectionViewFlowLayout in Frameworks */, 6BDA29AB29D6F37C003847ED /* ECashKit in Frameworks */, @@ -4440,8 +4476,8 @@ D3AF5A8B29FFD85800C1399E /* RxRelay in Frameworks */, D3993DB828F42595008720FB /* WalletConnect in Frameworks */, D3C187DB290FCFBC00FE1900 /* SectionsTableView in Frameworks */, + 6B55E33B2AF26D6400616B60 /* Starscream in Frameworks */, D3AF5A8929FFD85800C1399E /* RxCocoa in Frameworks */, - D3993DB628F42595008720FB /* WalletConnectV1 in Frameworks */, 500F1D1127AA87BC002AA419 /* AlignedCollectionViewFlowLayout in Frameworks */, D3604E6928F02DF30066C366 /* BitcoinCashKit in Frameworks */, D3993DC228F42992008720FB /* UnstoppableDomainsResolution in Frameworks */, @@ -4669,22 +4705,19 @@ 11B351AAA560798455BC2E48 /* WalletConnect */ = { isa = PBXGroup; children = ( + ABC9AA3A1DE80490A419F658 /* List */, + ABC9A6073E7A8B2997B27997 /* Main */, + ABC9AF0B88F3140CBD4406B8 /* Pairings */, + ABC9A25DA779297B95A9BFD0 /* PendingRequests */, 11B35F8F04804673FF91D3F0 /* Request */, + ABC9A63273CF7429742F1CD7 /* ScanQr */, 1A564CE43A1CD390D196FD83 /* Views */, - 11B35A9F154EC84CEFA909B9 /* WalletConnectInteractor.swift */, 11B35B968B299A67FC7FEAE3 /* WalletConnectManager.swift */, 11B35CD5EBBB403D46BDEF0B /* WalletConnectRequest.swift */, - ABC9AA3A1DE80490A419F658 /* List */, - ABC9A63273CF7429742F1CD7 /* ScanQr */, - ABC9A25DA779297B95A9BFD0 /* PendingRequests */, - ABC9A6073E7A8B2997B27997 /* Main */, ABC9A1136889E6976E17B347 /* WalletConnectService.swift */, ABC9A1C31F5343EB2BEA4540 /* WalletConnectUriHandler.swift */, ABC9A0F966294A4E629CCB65 /* WalletConnectModule.swift */, ABC9A0483AEAEB88DFBDD873 /* WalletConnectSocketConnectionService.swift */, - ABC9AF0B88F3140CBD4406B8 /* Pairings */, - ABC9A71A64E11AD3709A1174 /* Workers */, - ABC9AA77C414AC06C41F9319 /* SessionRequestFilterManager.swift */, ); path = WalletConnect; sourceTree = ""; @@ -4874,6 +4907,7 @@ 11B3593FBD158050C9FEF6B9 /* Misc.swift */, ABC9A9B35C58F6525F3B2D5C /* FullCoin.swift */, ABC9A830FE79DBF62FD63CC4 /* ThemeMode.swift */, + ABC9A3DFC1E03CB2E6C12F2C /* Encodable.swift */, ); path = Extensions; sourceTree = ""; @@ -5326,6 +5360,7 @@ 11B35597F6C8570E3C7ABFBF /* Main */ = { isa = PBXGroup; children = ( + 6B2907162AF0CB8A006157D6 /* Workers */, 11B35B96D2BC5994AC8EC794 /* MainModule.swift */, 11B35B6D6FCA3745DE0750BD /* MainService.swift */, 11B35C13937F82D36C823205 /* MainBadgeService.swift */, @@ -6359,9 +6394,8 @@ children = ( 11B35379F3DD5F8DA1B8E498 /* SendEthereumTransaction */, 1A5647792BF6E777F087999A /* Sign */, - 11B356C2E5AF8ED41E2B545D /* WalletConnectRequestModule.swift */, 11B355DBB08BD360380F7EAF /* WalletConnectRequestViewController.swift */, - ABC9AA31438063F7AB7BDDC8 /* WalletConnectRequestMapper.swift */, + ABC9AD77B1791DBEE6E06090 /* Handlers */, ); path = Request; sourceTree = ""; @@ -7236,14 +7270,34 @@ path = UnstoppableWallet/Modules/Coin/Indicators/Settings; sourceTree = SOURCE_ROOT; }; - 6BC3B11A2AE683F900B8E562 /* WidgetCoinAppShowWorker */ = { + 6B2907162AF0CB8A006157D6 /* Workers */ = { isa = PBXGroup; children = ( - 6BC3B11B2AE683F900B8E562 /* WidgetCoinAppShowModule.swift */, + 6B2907172AF0CB8A006157D6 /* WalletConnectAppShowWorker */, + 6B29071C2AF0CB8A006157D6 /* WidgetCoinAppShowWorker */, + 6B29071E2AF0CB8A006157D6 /* EventHandler.swift */, ); - name = WidgetCoinAppShowWorker; - path = UnstoppableWallet/Modules/Main/Workers/WidgetCoinAppShowWorker; - sourceTree = SOURCE_ROOT; + path = Workers; + sourceTree = ""; + }; + 6B2907172AF0CB8A006157D6 /* WalletConnectAppShowWorker */ = { + isa = PBXGroup; + children = ( + 6B2907182AF0CB8A006157D6 /* WalletConnectAppShowService.swift */, + 6B2907192AF0CB8A006157D6 /* WalletConnectAppShowModule.swift */, + 6B29071A2AF0CB8A006157D6 /* WalletConnectAppShowViewModel.swift */, + 6B29071B2AF0CB8A006157D6 /* WalletConnectAppShowView.swift */, + ); + path = WalletConnectAppShowWorker; + sourceTree = ""; + }; + 6B29071C2AF0CB8A006157D6 /* WidgetCoinAppShowWorker */ = { + isa = PBXGroup; + children = ( + 6B29071D2AF0CB8A006157D6 /* WidgetCoinAppShowModule.swift */, + ); + path = WidgetCoinAppShowWorker; + sourceTree = ""; }; 6BCD52F62A161F4100993F20 /* ICloud */ = { isa = PBXGroup; @@ -7518,6 +7572,16 @@ path = ContactBookList; sourceTree = ""; }; + ABC9A4990B6BEC2DBDA10D58 /* Proposal */ = { + isa = PBXGroup; + children = ( + ABC9A768C7AA282229C30409 /* ProposalChain.swift */, + ABC9AE997CF6814BA9EAA6BB /* ProposalValidator.swift */, + ABC9ACED8C1A430EB4EB097F /* Eip155ProposalHandler.swift */, + ); + path = Proposal; + sourceTree = ""; + }; ABC9A4B2FB3E02FF5B5B62A5 /* PendingRequest */ = { isa = PBXGroup; children = ( @@ -7535,6 +7599,16 @@ path = KeyboardTracker; sourceTree = ""; }; + ABC9A4D18F10F5AB6F46CE5F /* Wallet */ = { + isa = PBXGroup; + children = ( + ABC9AE5B5F3F21C12DD17A95 /* WCWalletPayload.swift */, + ABC9A9BCCCE1CF80E10A174C /* WCWalletHandler.swift */, + ABC9AB3C230E3289C206ED9C /* WalletConnectChain.swift */, + ); + path = Wallet; + sourceTree = ""; + }; ABC9A4FE6BE86F9163319A4A /* Send */ = { isa = PBXGroup; children = ( @@ -7582,6 +7656,7 @@ ABC9AEA1D717D8CED8462AB0 /* WalletConnectMainViewModel.swift */, ABC9A4B2FB3E02FF5B5B62A5 /* PendingRequest */, ABC9AD18F3E73F96DD6C4FA9 /* WalletConnectMainService.swift */, + ABC9A4990B6BEC2DBDA10D58 /* Proposal */, ); path = Main; sourceTree = ""; @@ -7640,17 +7715,6 @@ path = Crypto; sourceTree = ""; }; - ABC9A6B0734FA399147D5BBB /* WalletConnectAppShowWorker */ = { - isa = PBXGroup; - children = ( - ABC9A845B2969166028BA5F0 /* WalletConnectAppShowView.swift */, - ABC9AA3B8927F9F138ABCFB8 /* WalletConnectAppShowService.swift */, - ABC9A3FB680357E569B6DB5F /* WalletConnectAppShowViewModel.swift */, - ABC9A9E2C039C005650491D2 /* WalletConnectAppShowModule.swift */, - ); - path = WalletConnectAppShowWorker; - sourceTree = ""; - }; ABC9A6D0013823EF4EECB442 /* RestoreFile */ = { isa = PBXGroup; children = ( @@ -7681,16 +7745,6 @@ path = RestoreFileConfiguration; sourceTree = ""; }; - ABC9A71A64E11AD3709A1174 /* Workers */ = { - isa = PBXGroup; - children = ( - 6BC3B11A2AE683F900B8E562 /* WidgetCoinAppShowWorker */, - ABC9A6B0734FA399147D5BBB /* WalletConnectAppShowWorker */, - ABC9A950663B76424B1761B3 /* EventHandler.swift */, - ); - path = Workers; - sourceTree = ""; - }; ABC9A76ACF7C7D6D7D3FA323 /* Components */ = { isa = PBXGroup; children = ( @@ -7722,6 +7776,16 @@ path = RestoreCloud; sourceTree = ""; }; + ABC9A917A409708B8B2BEA71 /* EthereumTransaction */ = { + isa = PBXGroup; + children = ( + ABC9ABC82FDCC360FDF9CC72 /* WCEthereumTransactionHandler.swift */, + ABC9AB05E1D374DB3454F9B2 /* WCEthereumTransactionPayload.swift */, + ABC9AF0029A65DAB20925BDF /* WalletConnectTransaction.swift */, + ); + path = EthereumTransaction; + sourceTree = ""; + }; ABC9A989B1CF1BE4696D4E88 /* BackupPassword */ = { isa = PBXGroup; children = ( @@ -7833,6 +7897,15 @@ path = BackupDisclaimer; sourceTree = ""; }; + ABC9AC58DAF644C1362A0DA9 /* Sign */ = { + isa = PBXGroup; + children = ( + ABC9A0643C6E6FA30D7EE473 /* WCSignMessageHandler.swift */, + ABC9AF628790F13411CB3D1C /* WCSignMessagePayload.swift */, + ); + path = Sign; + sourceTree = ""; + }; ABC9AC691EEA7276F0A21357 /* Views */ = { isa = PBXGroup; children = ( @@ -7877,6 +7950,20 @@ path = Platforms; sourceTree = ""; }; + ABC9AD77B1791DBEE6E06090 /* Handlers */ = { + isa = PBXGroup; + children = ( + ABC9AC335F1215FE4F79C419 /* WalletConnectRequestChain.swift */, + ABC9A6D3F5BA199C53A5D955 /* Eip155RequestFactory.swift */, + ABC9A88CFC0598CD6D780AC2 /* WalletConnectRequestHandler.swift */, + ABC9A917A409708B8B2BEA71 /* EthereumTransaction */, + ABC9AC58DAF644C1362A0DA9 /* Sign */, + ABC9A4D18F10F5AB6F46CE5F /* Wallet */, + ABC9A8E515FB42EDE9ABD7DE /* WCRequestPayload.swift */, + ); + path = Handlers; + sourceTree = ""; + }; ABC9ADC8373B45DF33E35DCA /* Binance */ = { isa = PBXGroup; children = ( @@ -8371,7 +8458,6 @@ D3604E9D28F03DC00066C366 /* BinanceChainKit */, D3604E9F28F03DC00066C366 /* DashKit */, D3993DA628F422BD008720FB /* ZcashLightClientKit */, - D3993DAD28F4256F008720FB /* WalletConnectV1 */, D3993DAF28F4256F008720FB /* WalletConnect */, D3993DBC28F4278F008720FB /* ActionSheet */, D3993DC328F429AA008720FB /* UnstoppableDomainsResolution */, @@ -8392,6 +8478,7 @@ D0EC34DC2A4450D200BB308B /* HCaptcha */, D3E6756F2AA9A24900F2BF60 /* SDWebImageSwiftUI */, D3E323C72AE7B8E400F73914 /* KeychainAccess */, + 6B55E33C2AF26D7A00616B60 /* Starscream */, ); productName = Wallet; productReference = D38405CE218317DF007D50AD /* Unstoppable D.app */; @@ -8435,7 +8522,6 @@ D3604E8428F03CDC0066C366 /* BinanceChainKit */, D3604E8728F03D9E0066C366 /* DashKit */, D3993DA428F4229F008720FB /* ZcashLightClientKit */, - D3993DB528F42595008720FB /* WalletConnectV1 */, D3993DB728F42595008720FB /* WalletConnect */, D3993DBA28F4277E008720FB /* ActionSheet */, D3993DC128F42992008720FB /* UnstoppableDomainsResolution */, @@ -8455,6 +8541,7 @@ D0EC34DA2A4450B100BB308B /* HCaptcha */, D3E6756D2AA9A21300F2BF60 /* SDWebImageSwiftUI */, D3E323C92AE7B8F400F73914 /* KeychainAccess */, + 6B55E33A2AF26D6400616B60 /* Starscream */, ); productName = Wallet; productReference = D38406BE21831B3D007D50AD /* Unstoppable.app */; @@ -8605,7 +8692,6 @@ D3604E8028F03C6B0066C366 /* XCRemoteSwiftPackageReference "FeeRateKit.Swift" */, D3604E8328F03CDC0066C366 /* XCRemoteSwiftPackageReference "BinanceChainKit.Swift" */, D3604E8628F03D9E0066C366 /* XCRemoteSwiftPackageReference "DashKit.Swift" */, - D3993D9C28F41F5C008720FB /* XCRemoteSwiftPackageReference "wallet-connect-swift" */, D3993DA328F4229F008720FB /* XCRemoteSwiftPackageReference "ZcashLightClientKit" */, D3993DAA28F42549008720FB /* XCRemoteSwiftPackageReference "WalletConnectSwiftV2" */, D3993DB928F4277E008720FB /* XCRemoteSwiftPackageReference "ActionSheet.Swift" */, @@ -8627,6 +8713,7 @@ 6B55461F2A6E73190054B524 /* XCRemoteSwiftPackageReference "UIExtensions.Swift" */, D3E6756C2AA9A21300F2BF60 /* XCRemoteSwiftPackageReference "SDWebImageSwiftUI" */, D3E323C62AE7B8E400F73914 /* XCRemoteSwiftPackageReference "KeychainAccess" */, + 6B55E3392AF26D6400616B60 /* XCRemoteSwiftPackageReference "Starscream" */, ); productRefGroup = D3285F4320BD158E00644076 /* Products */; projectDirPath = ""; @@ -8914,6 +9001,7 @@ 58AAA410C9996BA929E3CEEF /* InfoModule.swift in Sources */, D05E96982A262149002CCD71 /* TronTransactionRecord.swift in Sources */, D36DE0C7272FD864000BC916 /* UniswapViewModel.swift in Sources */, + 6B2907282AF0CB8A006157D6 /* WidgetCoinAppShowModule.swift in Sources */, 58AAA9B29938CA65FA3CB3F0 /* AdditionalDataView.swift in Sources */, 2FA5D0C39052BB3698B95876 /* LogRecord.swift in Sources */, 2FA5D7DC6E8D68CD487D0825 /* LogRecordManager.swift in Sources */, @@ -8933,14 +9021,13 @@ 58AAAFE644C1B236B9714B47 /* CoinSelectViewModel.swift in Sources */, 50701ACF25B041E600EDE51B /* JailbreakTestManager.swift in Sources */, 11B3582D3298B7C072FBAD86 /* WalletConnectRequestViewController.swift in Sources */, - 11B35D6C064BE981FDA401D6 /* WalletConnectInteractor.swift in Sources */, D36DE0C4272FD864000BC916 /* UniswapModule.swift in Sources */, D05E968E2A25D6C6002CCD71 /* Trc20Adapter.swift in Sources */, 11B355F32686B8689B4EC105 /* WalletConnectRequest.swift in Sources */, - 11B3534916B76A847608D1A4 /* WalletConnectRequestModule.swift in Sources */, 11B35C8C8D0A03E63B10742D /* WalletConnectSendEthereumTransactionRequestService.swift in Sources */, 11B3599D72F7C8F193013F4C /* WalletConnectSendEthereumTransactionRequestViewModel.swift in Sources */, 11B35501FF8D70198E9B369D /* WalletConnectSendEthereumTransactionRequestModule.swift in Sources */, + 6B2907222AF0CB8A006157D6 /* WalletConnectAppShowModule.swift in Sources */, D008CA5B267C8DDF00001E0A /* EvmIncomingTransactionRecord.swift in Sources */, 11B35C2FBF875F81E13CC575 /* CoinService.swift in Sources */, 1A5647072B937BE4B69FFA1D /* SendEthereumErrorCell.swift in Sources */, @@ -9276,6 +9363,7 @@ 11B35664B1EDEAB99B7B51AE /* MarketCategoryModule.swift in Sources */, 11B358F9D6842ECD84E80752 /* MarketCategoryViewModel.swift in Sources */, 11B35DFCEC1D363B160479EE /* MarketTopService.swift in Sources */, + 6B2907262AF0CB8A006157D6 /* WalletConnectAppShowView.swift in Sources */, 11B35A5A820C1BCC1A92E944 /* MarketTopViewController.swift in Sources */, 11B35A8BB87C68ACF4594C99 /* MarketTopModule.swift in Sources */, 11B35FF6D36153F372C16C32 /* MarketWatchlistViewModel.swift in Sources */, @@ -9385,7 +9473,6 @@ ABC9AB86218564E4873F6428 /* WalletConnectUriHandler.swift in Sources */, ABC9A9E3191338CD0D1DE8AE /* WalletConnectModule.swift in Sources */, D09D76922A2E0753004311E6 /* SendTronConfirmationViewModel.swift in Sources */, - ABC9A2FF431ACFA812F58AD1 /* WalletConnectRequestMapper.swift in Sources */, ABC9A4566EA1995007490C0D /* SendFeeViewModel.swift in Sources */, ABC9A6C0A45A33C83B632D58 /* SendFeeService.swift in Sources */, ABC9AE6D877341985A6F651F /* SendBitcoinAmountInputService.swift in Sources */, @@ -9395,6 +9482,7 @@ 11B359C198AA7A141522E5E9 /* EvmAccountManagerFactory.swift in Sources */, 11B350918797E615D4FF6677 /* BlockchainSettingRecordStorage.swift in Sources */, 11B35B7132B99D12DC745064 /* BtcBlockchainSettingsModule.swift in Sources */, + 6B2907202AF0CB8A006157D6 /* WalletConnectAppShowService.swift in Sources */, 11B35F6B92C2FB142E522828 /* BtcBlockchainSettingsViewModel.swift in Sources */, 11B35CC0D8AC06CE594F84DA /* BtcBlockchainSettingsService.swift in Sources */, 11B35328EA42C49649B1E3F6 /* SyncMode_v_0_24.swift in Sources */, @@ -9438,6 +9526,7 @@ 11B353B085BD167026DE4B5B /* CustomToken.swift in Sources */, 1A564BC7CE38935CD443C235 /* MarketOverviewTopCoinsDataSource.swift in Sources */, 1A56405536E22BFF69EE9593 /* MarketOverviewTopCoinsViewModel.swift in Sources */, + 6B29072A2AF0CB8A006157D6 /* EventHandler.swift in Sources */, 1A564E1912184BFC886548D9 /* MarketOverviewCategoryDataSource.swift in Sources */, 1A564C6CCA15813506F20561 /* MarketOverviewCategoryViewModel.swift in Sources */, 1A5640D097E24A155C1F2E56 /* MarketOverviewCategoryCell.swift in Sources */, @@ -9643,9 +9732,6 @@ ABC9A1FFFB4F9EC58BF78661 /* AccountRestoreWarningManager.swift in Sources */, ABC9A51E36466E414AF24C67 /* WalletConnectMainPendingRequestViewModel.swift in Sources */, ABC9A6A484F9B3F7F1054379 /* WalletConnectMainPendingRequestService.swift in Sources */, - ABC9A1117A41AB8CE00FDEDB /* WalletConnectAppShowView.swift in Sources */, - ABC9ADD2F99F8C6A6C346FCC /* WalletConnectAppShowService.swift in Sources */, - ABC9AC78B2D374511F751997 /* WalletConnectAppShowViewModel.swift in Sources */, 2FA5D342449885CF8D58B704 /* HdWalletExtensions.swift in Sources */, ABC9A2545322919129F163D5 /* SwapInputCardView.swift in Sources */, ABC9AA78419B8BFEC23E8E02 /* TokenSelectView.swift in Sources */, @@ -9681,7 +9767,6 @@ 11B35D106185086B3BEC5119 /* Blockchain.swift in Sources */, 11B35E9CEC6187783834860E /* BlockchainType.swift in Sources */, 11B3520C2D5B798791FC6223 /* Coin.swift in Sources */, - 6BC3B11D2AE683F900B8E562 /* WidgetCoinAppShowModule.swift in Sources */, 11B355756A2457C64C969024 /* CoinCategory.swift in Sources */, 11B35CCC9D6B7596502B4381 /* CoinInvestment.swift in Sources */, 11B356DA0B90ECAB25C520B7 /* CoinTreasury.swift in Sources */, @@ -9714,6 +9799,7 @@ 11B35A4F54E1310A7963593F /* PrivateKeysModule.swift in Sources */, 11B35E46AD24E3998EBB25A7 /* PrivateKeysService.swift in Sources */, 11B3524EBBAC04F202622104 /* PrivateKeysViewController.swift in Sources */, + 6B2907242AF0CB8A006157D6 /* WalletConnectAppShowViewModel.swift in Sources */, 11B35E075BBD2BBCF2F650D4 /* EvmAddressViewController.swift in Sources */, 11B35C25C220A84A08A3CEBA /* EvmAddressModule.swift in Sources */, 11B3580696C6391D4C125245 /* EvmAddressService.swift in Sources */, @@ -9842,7 +9928,6 @@ ABC9A733703BD9E28B90BECD /* MaIndicatorDataSource.swift in Sources */, ABC9A85CCDCE367D1873AB5D /* RsiIndicatorDataSource.swift in Sources */, ABC9A7297650FD2D9F8F595F /* MacdIndicatorDataSource.swift in Sources */, - ABC9AC79493AB0EC96904164 /* SessionRequestFilterManager.swift in Sources */, 11B35BB8792B6677AD26E254 /* CoinAnalyticsRatingScaleViewController.swift in Sources */, ABC9AB9DCC782F2EC14A7031 /* TechnicalIndicatorService.swift in Sources */, ABC9ACADAE8CFCAC777D048B /* CoinIndicatorViewItemFactory.swift in Sources */, @@ -9956,8 +10041,6 @@ 11B356C983C2A2B552D214A4 /* ListSectionFooter.swift in Sources */, 11B35C7425B861D2F32384E8 /* ListSectionHeader.swift in Sources */, 11B359E225E30E97A6354FAC /* ListSectionInfoHeader.swift in Sources */, - ABC9A4B9A4CC3A9EE9A89C32 /* EventHandler.swift in Sources */, - ABC9AD7C556CD68024FBEDF7 /* WalletConnectAppShowModule.swift in Sources */, 11B35FE0809AC8A716C41427 /* PrimaryButtonStyle.swift in Sources */, 11B35193A8E75B6D6117FBC7 /* View.swift in Sources */, 11B357F36D1D90B2C54999AE /* BottomGradientWrapper.swift in Sources */, @@ -10062,6 +10145,22 @@ 11B351C9363D848E73AF742A /* ScamFilterModule.swift in Sources */, 11B35BCFF2CAA360EF2A9272 /* ScamFilterView.swift in Sources */, 11B35B34696958F957733B12 /* ScamFilterViewModel.swift in Sources */, + ABC9A5E5EFF9D46D036F52B9 /* ProposalChain.swift in Sources */, + ABC9A220C97C81DC578AA3C7 /* ProposalValidator.swift in Sources */, + ABC9A38390F78983E4DBD25D /* Eip155ProposalHandler.swift in Sources */, + ABC9A1DBAB7096605C181247 /* WalletConnectRequestChain.swift in Sources */, + ABC9ABBE120DB35A597FFE44 /* Encodable.swift in Sources */, + ABC9A8F14BF1F645F1DEB04A /* Eip155RequestFactory.swift in Sources */, + ABC9A13FE5AA68886E70CD2D /* WalletConnectRequestHandler.swift in Sources */, + ABC9AEAAB96049FCD4F4F67D /* WCEthereumTransactionHandler.swift in Sources */, + ABC9A2E2F6D884CC8444C029 /* WCSignMessageHandler.swift in Sources */, + ABC9A6424F39E24F7198B9DF /* WCSignMessagePayload.swift in Sources */, + ABC9A436F7B4A40DED7F9164 /* WCEthereumTransactionPayload.swift in Sources */, + ABC9A4F144A81832F29C1216 /* WCWalletPayload.swift in Sources */, + ABC9A60C112A25A070D40C1C /* WCWalletHandler.swift in Sources */, + ABC9A784C59999B2F7D2DEAF /* WalletConnectChain.swift in Sources */, + ABC9A48C20CE22D9BAF528F3 /* WalletConnectTransaction.swift in Sources */, + ABC9A6904E4DAE4C34EAEAE7 /* WCRequestPayload.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -10077,7 +10176,6 @@ D38405F121831B3D007D50AD /* Protocols.swift in Sources */, D38405F421831B3D007D50AD /* LaunchModule.swift in Sources */, D07157DE2A2DDA09006F141F /* SendTronService.swift in Sources */, - 6BC3B11C2AE683F900B8E562 /* WidgetCoinAppShowModule.swift in Sources */, D087628429826E3100E6FFD4 /* WatchService.swift in Sources */, D008CA5E267C8DEC00001E0A /* EvmOutgoingTransactionRecord.swift in Sources */, D35B518C21942E7A00504FBA /* TermsViewController.swift in Sources */, @@ -10296,10 +10394,8 @@ 50701ACE25B041E600EDE51B /* JailbreakTestManager.swift in Sources */, 11B35A8456750E9838BBEA93 /* WalletConnectRequestViewController.swift in Sources */, D36DE0F6272FD92F000BC916 /* SwapSelectProviderViewController.swift in Sources */, - 11B357CD9544E312865CE36F /* WalletConnectInteractor.swift in Sources */, D05E968D2A25D6C6002CCD71 /* Trc20Adapter.swift in Sources */, 11B350D6CBB602F510882F1E /* WalletConnectRequest.swift in Sources */, - 11B359E8FA2FD4E7CF6A40AD /* WalletConnectRequestModule.swift in Sources */, D02A67CB272A7460009B2C1C /* TwitterUsersResponse.swift in Sources */, 11B35A71C30FB6172C74D09D /* WalletConnectSendEthereumTransactionRequestService.swift in Sources */, 11B351D7E210D669F43C6E58 /* WalletConnectSendEthereumTransactionRequestViewModel.swift in Sources */, @@ -10467,6 +10563,7 @@ 11B35DE8053A86FB32D05AF3 /* WalletViewController.swift in Sources */, 11B353FCF929C0CF960C96FA /* WalletModule.swift in Sources */, 11B35897566548048FCEC11E /* WalletBlockchainElementService.swift in Sources */, + 6B29071F2AF0CB8A006157D6 /* WalletConnectAppShowService.swift in Sources */, 11B3511037E26318792E7DF3 /* WalletCoinPriceService.swift in Sources */, 11B359B09D7E49066368CFE0 /* WalletViewItemFactory.swift in Sources */, 11B3583C648DBE72892FEEDB /* WalletSorter.swift in Sources */, @@ -10590,6 +10687,7 @@ 58AAAA3E05FEB10822DFC8EE /* SwapStepCell.swift in Sources */, D023D2712A25CF61004F65B0 /* TronAdapter.swift in Sources */, 11B3517B2CB1A05BA5FEDB1F /* String.swift in Sources */, + 6B2907232AF0CB8A006157D6 /* WalletConnectAppShowViewModel.swift in Sources */, 11B3517A67227ECCDE817036 /* CoinMajorHoldersModule.swift in Sources */, 11B35990CB6691F679D241C8 /* CoinMajorHoldersViewModel.swift in Sources */, 11B3597E6EA5BF1AF3A58295 /* CoinMajorHoldersViewController.swift in Sources */, @@ -10675,6 +10773,7 @@ D07157DB2A2DD968006F141F /* SendTronModule.swift in Sources */, 11B351EE1B16B2A26B5D6A40 /* CoinInvestorsService.swift in Sources */, 11B35EDC3703B04ED8B72BA8 /* CoinTreasuriesModule.swift in Sources */, + 6B2907272AF0CB8A006157D6 /* WidgetCoinAppShowModule.swift in Sources */, 11B35147B6C9B62FC86A5BB9 /* CoinTreasuriesViewController.swift in Sources */, 11B3503C1335F0860B6DF7B8 /* CoinTreasuriesService.swift in Sources */, 6BCD53042A161F4100993F20 /* ICloudBackupTermsViewController.swift in Sources */, @@ -10749,7 +10848,6 @@ ABC9ADF2CFB90B882B5DE3F9 /* WalletConnectService.swift in Sources */, ABC9A4F4B7F17169DC240A98 /* WalletConnectUriHandler.swift in Sources */, ABC9AA27A709AC5F85176A53 /* WalletConnectModule.swift in Sources */, - ABC9A736DDFBF98473C065F7 /* WalletConnectRequestMapper.swift in Sources */, ABC9ABC375B65451761D4766 /* SendFeeViewModel.swift in Sources */, ABC9A933C2603486BA181B19 /* SendFeeService.swift in Sources */, ABC9A4B643D98FB95F431401 /* SendBitcoinAmountInputService.swift in Sources */, @@ -11006,9 +11104,6 @@ ABC9A9FA3285B39D25801C2A /* AccountRestoreWarningManager.swift in Sources */, ABC9A2EEC77205793C21F9A1 /* WalletConnectMainPendingRequestViewModel.swift in Sources */, ABC9A9221E4FF0734089BCAB /* WalletConnectMainPendingRequestService.swift in Sources */, - ABC9AC850D83253B2B6FBD0A /* WalletConnectAppShowView.swift in Sources */, - ABC9A1994630FAD8B42DDF67 /* WalletConnectAppShowService.swift in Sources */, - ABC9AB71563E5F2C9F2EA9E4 /* WalletConnectAppShowViewModel.swift in Sources */, 2FA5DAFBFC02E2E70EA0D971 /* HdWalletExtensions.swift in Sources */, ABC9A618B77A70D94E269D6B /* SwapInputCardView.swift in Sources */, ABC9A51979D2047BEF45A2AE /* TokenSelectView.swift in Sources */, @@ -11184,6 +11279,7 @@ 11B350C214D423CE2DCD6853 /* CexAssetRecord.swift in Sources */, 11B355B56270FCD8A17A49B5 /* CexWithdrawNetworkRaw.swift in Sources */, 11B35841E0B353B727DCD9CF /* CexAssetManager.swift in Sources */, + 6B2907212AF0CB8A006157D6 /* WalletConnectAppShowModule.swift in Sources */, 11B35C95EA77972246D5F3BD /* CexAssetRecordStorage.swift in Sources */, 11B35A5B8DC265D419E69B05 /* CexAssetResponse.swift in Sources */, 11B35CA25E02E397E167EEC3 /* QrCodeCell.swift in Sources */, @@ -11201,7 +11297,6 @@ ABC9A8551E1F8220D62552BC /* MaIndicatorDataSource.swift in Sources */, ABC9A85BF47CEA922CB06B9D /* RsiIndicatorDataSource.swift in Sources */, ABC9AA86292CD59848A130F9 /* MacdIndicatorDataSource.swift in Sources */, - ABC9A0E6EE31D5675542EE0B /* SessionRequestFilterManager.swift in Sources */, 11B353DE48A4B088210D927D /* CoinAnalyticsRatingScaleViewController.swift in Sources */, ABC9A5A0C65184DF54C48C5A /* TechnicalIndicatorService.swift in Sources */, ABC9A20D2DDF8736293DE5C5 /* CoinIndicatorViewItemFactory.swift in Sources */, @@ -11316,14 +11411,13 @@ 11B355B94EB2D73559DF2AC0 /* ListSectionFooter.swift in Sources */, 11B35CDC811A92DFAAF2C923 /* ListSectionHeader.swift in Sources */, 11B3528B1101D2E02ECB4631 /* ListSectionInfoHeader.swift in Sources */, - ABC9AE775BB25CDB7AA83228 /* EventHandler.swift in Sources */, - ABC9AA462C94586CD8233295 /* WalletConnectAppShowModule.swift in Sources */, 11B35C88ACACE26AC40F35BA /* PrimaryButtonStyle.swift in Sources */, 11B35F3409AEFC534DC52137 /* View.swift in Sources */, 11B359EA8B77C68A8D9BA4CA /* BottomGradientWrapper.swift in Sources */, 11B35B6E11AE440A79D53E0F /* BlockchainSettingsView.swift in Sources */, 11B35245CD0D5B0E44E413F4 /* AppearanceView.swift in Sources */, 6BE8A07E2ADE2F950012DE7F /* CurrencyValue.swift in Sources */, + 6B2907292AF0CB8A006157D6 /* EventHandler.swift in Sources */, 11B35A18AA61F8C06AB1C15B /* AppearanceViewModel.swift in Sources */, ABC9A2C4301447E0EEA1D16F /* FullBackup.swift in Sources */, ABC9A99861B1F83A19EA370D /* SettingsBackup.swift in Sources */, @@ -11405,6 +11499,7 @@ 11B35FD593B38EEEE5F18010 /* AppWidgetConstants.swift in Sources */, 11B35909DEBFA098976E1D87 /* DateFormatterCache.swift in Sources */, 11B350938ACDA1EEF888E846 /* LanguageHourFormatter.swift in Sources */, + 6B2907252AF0CB8A006157D6 /* WalletConnectAppShowView.swift in Sources */, 11B357D1BFE20978857A2FDC /* LanguageSettingsModule.swift in Sources */, 11B35FE603192CF3195115D0 /* LanguageSettingsViewModel.swift in Sources */, 11B35A40665567C6CE6EEBCC /* LanguageSettingsView.swift in Sources */, @@ -11421,6 +11516,22 @@ 11B35E214D370A2455F465F7 /* ScamFilterModule.swift in Sources */, 11B35E14EE021601520E17E1 /* ScamFilterView.swift in Sources */, 11B35AC64FE8360BAD4B42C7 /* ScamFilterViewModel.swift in Sources */, + ABC9AB92AA6E6B239B147FA7 /* ProposalChain.swift in Sources */, + ABC9A9DFE387DE03A693A06A /* ProposalValidator.swift in Sources */, + ABC9A1A5A19D4CC70E868727 /* Eip155ProposalHandler.swift in Sources */, + ABC9A0EEAF28FD7E8855B68B /* WalletConnectRequestChain.swift in Sources */, + ABC9A2969ACF7FD0801043FE /* Encodable.swift in Sources */, + ABC9A932AD114A779BF4EC16 /* Eip155RequestFactory.swift in Sources */, + ABC9AC5C5D51D703D7867211 /* WalletConnectRequestHandler.swift in Sources */, + ABC9AD900F508E6A1FD96662 /* WCEthereumTransactionHandler.swift in Sources */, + ABC9A8CB0A676BEFF303E78B /* WCSignMessageHandler.swift in Sources */, + ABC9A449BE71D70D4A315333 /* WCSignMessagePayload.swift in Sources */, + ABC9AB27C7AA17FA3D38D912 /* WCEthereumTransactionPayload.swift in Sources */, + ABC9AC2A8C8117EBE76078DE /* WCWalletPayload.swift in Sources */, + ABC9A6F265D51BD94CB43209 /* WCWalletHandler.swift in Sources */, + ABC9A41B8484D568EEAD72AE /* WalletConnectChain.swift in Sources */, + ABC9A82C93C9E266D1AFD1C3 /* WalletConnectTransaction.swift in Sources */, + ABC9A43B0EDD9BB6291F2E46 /* WCRequestPayload.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -12186,6 +12297,14 @@ version = 1.0.2; }; }; + 6B55E3392AF26D6400616B60 /* XCRemoteSwiftPackageReference "Starscream" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/daltoniam/Starscream"; + requirement = { + kind = upToNextMajorVersion; + minimumVersion = 3.1.2; + }; + }; 6BDA29A929D6EA9B003847ED /* XCRemoteSwiftPackageReference "ECashKit.Swift" */ = { isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/horizontalsystems/ECashKit.Swift.git"; @@ -12354,14 +12473,6 @@ minimumVersion = 1.0.4; }; }; - D3993D9C28F41F5C008720FB /* XCRemoteSwiftPackageReference "wallet-connect-swift" */ = { - isa = XCRemoteSwiftPackageReference; - repositoryURL = "https://github.com/horizontalsystems/wallet-connect-swift"; - requirement = { - kind = exactVersion; - version = 2.0.0; - }; - }; D3993DA328F4229F008720FB /* XCRemoteSwiftPackageReference "ZcashLightClientKit" */ = { isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/zcash/ZcashLightClientKit"; @@ -12535,6 +12646,16 @@ package = 500F1D0F27AA87BC002AA419 /* XCRemoteSwiftPackageReference "AlignedCollectionViewFlowLayout" */; productName = AlignedCollectionViewFlowLayout; }; + 6B55E33A2AF26D6400616B60 /* Starscream */ = { + isa = XCSwiftPackageProductDependency; + package = 6B55E3392AF26D6400616B60 /* XCRemoteSwiftPackageReference "Starscream" */; + productName = Starscream; + }; + 6B55E33C2AF26D7A00616B60 /* Starscream */ = { + isa = XCSwiftPackageProductDependency; + package = 6B55E3392AF26D6400616B60 /* XCRemoteSwiftPackageReference "Starscream" */; + productName = Starscream; + }; 6BDA29AA29D6F37C003847ED /* ECashKit */ = { isa = XCSwiftPackageProductDependency; package = 6BDA29A929D6EA9B003847ED /* XCRemoteSwiftPackageReference "ECashKit.Swift" */; @@ -12770,21 +12891,11 @@ package = D3993DA328F4229F008720FB /* XCRemoteSwiftPackageReference "ZcashLightClientKit" */; productName = ZcashLightClientKit; }; - D3993DAD28F4256F008720FB /* WalletConnectV1 */ = { - isa = XCSwiftPackageProductDependency; - package = D3993D9C28F41F5C008720FB /* XCRemoteSwiftPackageReference "wallet-connect-swift" */; - productName = WalletConnectV1; - }; D3993DAF28F4256F008720FB /* WalletConnect */ = { isa = XCSwiftPackageProductDependency; package = D3993DAA28F42549008720FB /* XCRemoteSwiftPackageReference "WalletConnectSwiftV2" */; productName = WalletConnect; }; - D3993DB528F42595008720FB /* WalletConnectV1 */ = { - isa = XCSwiftPackageProductDependency; - package = D3993D9C28F41F5C008720FB /* XCRemoteSwiftPackageReference "wallet-connect-swift" */; - productName = WalletConnectV1; - }; D3993DB728F42595008720FB /* WalletConnect */ = { isa = XCSwiftPackageProductDependency; package = D3993DAA28F42549008720FB /* XCRemoteSwiftPackageReference "WalletConnectSwiftV2" */; diff --git a/UnstoppableWallet/UnstoppableWallet/Core/App.swift b/UnstoppableWallet/UnstoppableWallet/Core/App.swift index 7762301d04..24cec35c53 100644 --- a/UnstoppableWallet/UnstoppableWallet/Core/App.swift +++ b/UnstoppableWallet/UnstoppableWallet/Core/App.swift @@ -32,7 +32,6 @@ class App { let marketKit: MarketKit.Kit - let themeManager: ThemeManager let systemInfoManager: SystemInfoManager @@ -94,6 +93,7 @@ class App { let guidesManager: GuidesManager let termsManager: TermsManager + let walletConnectRequestHandler: WalletConnectRequestChain let walletConnectSocketConnectionService: WalletConnectSocketConnectionService let walletConnectSessionManager: WalletConnectSessionManager let walletConnectManager: WalletConnectManager @@ -268,6 +268,11 @@ class App { guidesManager = GuidesManager(networkManager: networkManager) termsManager = TermsManager(userDefaultsStorage: userDefaultsStorage) + walletConnectRequestHandler = WalletConnectRequestChain.instance( + evmBlockchainManager: evmBlockchainManager, + accountManager: accountManager + ) + walletConnectManager = WalletConnectManager(accountManager: accountManager, evmBlockchainManager: evmBlockchainManager) let walletClientInfo = WalletConnectClientInfo( @@ -282,12 +287,17 @@ class App { walletConnectSocketConnectionService = WalletConnectSocketConnectionService(reachabilityManager: reachabilityManager, logger: logger) let walletConnectService = WalletConnectService( connectionService: walletConnectSocketConnectionService, - sessionRequestFilterManager: SessionRequestFilterManager(), info: walletClientInfo, logger: logger ) let walletConnectSessionStorage = WalletConnectSessionStorage(dbPool: dbPool) - walletConnectSessionManager = WalletConnectSessionManager(service: walletConnectService, storage: walletConnectSessionStorage, accountManager: accountManager, evmBlockchainManager: evmBlockchainManager, currentDateProvider: CurrentDateProvider()) + walletConnectSessionManager = WalletConnectSessionManager( + service: walletConnectService, + storage: walletConnectSessionStorage, + accountManager: accountManager, + requestHandler: walletConnectRequestHandler, + currentDateProvider: CurrentDateProvider() + ) deepLinkManager = DeepLinkManager() launchScreenManager = LaunchScreenManager(userDefaultsStorage: userDefaultsStorage) diff --git a/UnstoppableWallet/UnstoppableWallet/Core/Managers/WalletConnectSessionManager.swift b/UnstoppableWallet/UnstoppableWallet/Core/Managers/WalletConnectSessionManager.swift index a1b91b5917..a520f5d386 100644 --- a/UnstoppableWallet/UnstoppableWallet/Core/Managers/WalletConnectSessionManager.swift +++ b/UnstoppableWallet/UnstoppableWallet/Core/Managers/WalletConnectSessionManager.swift @@ -12,18 +12,18 @@ class WalletConnectSessionManager { private let storage: WalletConnectSessionStorage private let accountManager: AccountManager private let currentDateProvider: CurrentDateProvider - private let evmBlockchainManager: EvmBlockchainManager + private let requestHandler: IWalletConnectRequestHandler private let sessionsRelay = BehaviorRelay<[WalletConnectSign.Session]>(value: []) private let activePendingRequestsRelay = BehaviorRelay<[WalletConnectSign.Request]>(value: []) private let pairingsRelay = BehaviorRelay<[WalletConnectPairing.Pairing]>(value: []) private let sessionRequestReceivedRelay = PublishRelay() - init(service: WalletConnectService, storage: WalletConnectSessionStorage, accountManager: AccountManager, evmBlockchainManager: EvmBlockchainManager, currentDateProvider: CurrentDateProvider) { + init(service: WalletConnectService, storage: WalletConnectSessionStorage, accountManager: AccountManager, requestHandler: IWalletConnectRequestHandler, currentDateProvider: CurrentDateProvider) { self.service = service self.storage = storage self.accountManager = accountManager - self.evmBlockchainManager = evmBlockchainManager + self.requestHandler = requestHandler self.currentDateProvider = currentDateProvider subscribe(disposeBag, accountManager.accountDeletedObservable) { [weak self] in @@ -95,25 +95,17 @@ class WalletConnectSessionManager { } let activeSessions = storage.sessions(accountId: account.id) - guard let chainId = Int(request.chainId.reference), - let blockchain = evmBlockchainManager.blockchain(chainId: chainId), - let address = try? WalletConnectManager.evmAddress( - account: account, - chain: evmBlockchainManager.chain(blockchainType: blockchain.type) - ) - else { - return - } - - let chain = WalletConnectRequest.Chain(id: chainId, chainName: blockchain.name, address: address.eip55) guard activeSessions.first(where: { session in session.topic == request.topic }) != nil, - let session = allSessions.first(where: { session in session.topic == request.topic }), - let request = try? WalletConnectRequestMapper.map(dAppName: session.peer.name, chain: chain, request: request) - else { + let session = allSessions.first(where: { session in session.topic == request.topic }) else { return } - sessionRequestReceivedRelay.accept(request) + let request = requestHandler.handle(session: session, request: request) + switch request { + case .request(let request): sessionRequestReceivedRelay.accept(request) + case .handled: () + case .unsuccessful(error: let error): print("Error while parsing request: \(error)") + } } private func sessions(accountId: String, sessions: [WalletConnectSign.Session]?) -> [WalletConnectSign.Session] { @@ -137,12 +129,6 @@ class WalletConnectSessionManager { pairingsRelay.accept(service.pairings) } - private func isChainIdsEnabled(chainIds: [Int]) -> Bool { - chainIds.allSatisfy { id in - evmBlockchainManager.blockchain(chainId: id) != nil - } - } - private func requests(accountId: String? = nil) -> [WalletConnectSign.Request] { let allRequests = service.pendingRequests let dbSessions = storage.sessions(accountId: accountId) @@ -169,9 +155,7 @@ extension WalletConnectSessionManager { } public var allSessions: [WalletConnectSign.Session] { - service.activeSessions.filter { session in - isChainIdsEnabled(chainIds: session.chainIds) - } + service.activeSessions } public var sessionsObservable: Observable<[WalletConnectSign.Session]> { diff --git a/UnstoppableWallet/UnstoppableWallet/Extensions/Encodable.swift b/UnstoppableWallet/UnstoppableWallet/Extensions/Encodable.swift new file mode 100644 index 0000000000..0ccefe8edb --- /dev/null +++ b/UnstoppableWallet/UnstoppableWallet/Extensions/Encodable.swift @@ -0,0 +1,12 @@ +import Foundation + +extension Encodable { + public var encoded: Data { + let encoder = JSONEncoder() + encoder.outputFormatting = [.sortedKeys] + return try! encoder.encode(self) + } + public var encodedString: String { + String(data: encoded, encoding: .utf8)! + } +} diff --git a/UnstoppableWallet/UnstoppableWallet/Modules/Main/Workers/WalletConnectAppShowWorker/WalletConnectAppShowModule.swift b/UnstoppableWallet/UnstoppableWallet/Modules/Main/Workers/WalletConnectAppShowWorker/WalletConnectAppShowModule.swift index 6c8aa76af9..48315854e9 100644 --- a/UnstoppableWallet/UnstoppableWallet/Modules/Main/Workers/WalletConnectAppShowWorker/WalletConnectAppShowModule.swift +++ b/UnstoppableWallet/UnstoppableWallet/Modules/Main/Workers/WalletConnectAppShowWorker/WalletConnectAppShowModule.swift @@ -10,7 +10,10 @@ class WalletConnectAppShowModule { ) let walletConnectWorkerViewModel = WalletConnectAppShowViewModel(service: walletConnectWorkerService) - let viewController = WalletConnectAppShowView(viewModel: walletConnectWorkerViewModel) + let viewController = WalletConnectAppShowView( + viewModel: walletConnectWorkerViewModel, + requestViewFactory: App.shared.walletConnectRequestHandler + ) viewController.parentViewController = parentViewController return viewController diff --git a/UnstoppableWallet/UnstoppableWallet/Modules/Main/Workers/WalletConnectAppShowWorker/WalletConnectAppShowView.swift b/UnstoppableWallet/UnstoppableWallet/Modules/Main/Workers/WalletConnectAppShowWorker/WalletConnectAppShowView.swift index 610fcd2144..b2dbc51f77 100644 --- a/UnstoppableWallet/UnstoppableWallet/Modules/Main/Workers/WalletConnectAppShowWorker/WalletConnectAppShowView.swift +++ b/UnstoppableWallet/UnstoppableWallet/Modules/Main/Workers/WalletConnectAppShowWorker/WalletConnectAppShowView.swift @@ -8,6 +8,8 @@ class WalletConnectAppShowView { private let timeOut = 5 private let viewModel: WalletConnectAppShowViewModel + private let requestViewFactory: IWalletConnectRequestViewFactory + private var cancellables = Set() private var timerCancellable: AnyCancellable? private var isWaitingHandlerCancellable: AnyCancellable? @@ -16,8 +18,9 @@ class WalletConnectAppShowView { weak var parentViewController: UIViewController? - init(viewModel: WalletConnectAppShowViewModel) { + init(viewModel: WalletConnectAppShowViewModel, requestViewFactory: IWalletConnectRequestViewFactory) { self.viewModel = viewModel + self.requestViewFactory = requestViewFactory viewModel.showSessionRequestPublisher .receive(on: DispatchQueue.main) @@ -86,11 +89,16 @@ class WalletConnectAppShowView { } private func handle(request: WalletConnectRequest) { - guard let viewController = WalletConnectRequestModule.viewController(signService: App.shared.walletConnectSessionManager.service, request: request) else { + let result = requestViewFactory.viewController(request: request) + switch result { + case let .unsuccessful(error): + print("Can't create view") return + case let .controller(controller): + guard let controller else { return } + let navigationController = ThemeNavigationController(rootViewController: controller) + parentViewController?.visibleController.present(navigationController, animated: true) } - - parentViewController?.visibleController.present(ThemeNavigationController(rootViewController: viewController), animated: true) } } diff --git a/UnstoppableWallet/UnstoppableWallet/Modules/RestoreAccount/RestoreFile/RestorePassphrase/RestorePassphraseService.swift b/UnstoppableWallet/UnstoppableWallet/Modules/RestoreAccount/RestoreFile/RestorePassphrase/RestorePassphraseService.swift index cc1801a8d7..012c7434da 100644 --- a/UnstoppableWallet/UnstoppableWallet/Modules/RestoreAccount/RestoreFile/RestorePassphrase/RestorePassphraseService.swift +++ b/UnstoppableWallet/UnstoppableWallet/Modules/RestoreAccount/RestoreFile/RestorePassphrase/RestorePassphraseService.swift @@ -37,6 +37,7 @@ extension RestorePassphraseService { } switch rawBackup.account.type { case .cex: + appBackupProvider.restore(raws: [rawBackup]) return .success default: return .restoredAccount(rawBackup) diff --git a/UnstoppableWallet/UnstoppableWallet/Modules/Settings/Main/MainSettingsService.swift b/UnstoppableWallet/UnstoppableWallet/Modules/Settings/Main/MainSettingsService.swift index 50d6e5f78d..ea49ca1d5f 100644 --- a/UnstoppableWallet/UnstoppableWallet/Modules/Settings/Main/MainSettingsService.swift +++ b/UnstoppableWallet/UnstoppableWallet/Modules/Settings/Main/MainSettingsService.swift @@ -2,7 +2,7 @@ import Combine import RxRelay import RxSwift import ThemeKit -import WalletConnectV1 + class MainSettingsService { private let disposeBag = DisposeBag() diff --git a/UnstoppableWallet/UnstoppableWallet/Modules/Settings/Main/MainSettingsViewModel.swift b/UnstoppableWallet/UnstoppableWallet/Modules/Settings/Main/MainSettingsViewModel.swift index ab691277e2..b1f2561a4f 100644 --- a/UnstoppableWallet/UnstoppableWallet/Modules/Settings/Main/MainSettingsViewModel.swift +++ b/UnstoppableWallet/UnstoppableWallet/Modules/Settings/Main/MainSettingsViewModel.swift @@ -3,7 +3,6 @@ import RxCocoa import RxRelay import RxSwift import ThemeKit -import WalletConnectV1 class MainSettingsViewModel { private let service: MainSettingsService diff --git a/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Main/PendingRequest/WalletConnectMainPendingRequestService.swift b/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Main/PendingRequest/WalletConnectMainPendingRequestService.swift index 87592a0f53..fa84526f80 100644 --- a/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Main/PendingRequest/WalletConnectMainPendingRequestService.swift +++ b/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Main/PendingRequest/WalletConnectMainPendingRequestService.swift @@ -8,6 +8,8 @@ class WalletConnectMainPendingRequestService { private let accountManager: AccountManager private let sessionManager: WalletConnectSessionManager + private let requestHandler: IWalletConnectRequestHandler + private let evmBlockchainManager: EvmBlockchainManager private let signService: IWalletConnectSignService private var session: WalletConnectSign.Session? @@ -21,9 +23,10 @@ class WalletConnectMainPendingRequestService { private let showPendingRequestRelay = PublishRelay() - init(service: WalletConnectMainService, accountManager: AccountManager, sessionManager: WalletConnectSessionManager, evmBlockchainManager: EvmBlockchainManager, signService: IWalletConnectSignService) { + init(service: WalletConnectMainService, accountManager: AccountManager, sessionManager: WalletConnectSessionManager, requestHandler: IWalletConnectRequestHandler, evmBlockchainManager: EvmBlockchainManager, signService: IWalletConnectSignService) { self.accountManager = accountManager self.sessionManager = sessionManager + self.requestHandler = requestHandler self.evmBlockchainManager = evmBlockchainManager self.signService = signService session = service.session @@ -85,25 +88,18 @@ extension WalletConnectMainPendingRequestService { guard let request = sessionManager.pendingRequests().first(where: { $0.id.intValue == requestId }) else { return } - let session = sessionManager.sessions.first { $0.topic == request.topic } - - guard let chainId = Int(request.chainId.reference), - let blockchain = evmBlockchainManager.blockchain(chainId: chainId), - let account = accountManager.activeAccount, - let address = try? WalletConnectManager.evmAddress( - account: account, - chain: evmBlockchainManager.chain(blockchainType: blockchain.type) - ) else { + guard let session = sessionManager.sessions.first(where: { $0.topic == request.topic }) else { return } - let chain = WalletConnectRequest.Chain(id: chainId, chainName: blockchain.name, address: address.eip55) - - guard let wcRequest = try? WalletConnectRequestMapper.map(dAppName: session?.peer.name, chain: chain, request: request) else { - return + let result = requestHandler.handle(session: session, request: request) + switch result { + case let .unsuccessful(error): + print("Cant select request because: \(error)") + case .handled: () + case let .request(request): + showPendingRequestRelay.accept(request) } - - showPendingRequestRelay.accept(wcRequest) } func onReject(id: Int) { diff --git a/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Main/Proposal/Eip155ProposalHandler.swift b/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Main/Proposal/Eip155ProposalHandler.swift new file mode 100644 index 0000000000..a3a032f059 --- /dev/null +++ b/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Main/Proposal/Eip155ProposalHandler.swift @@ -0,0 +1,75 @@ +import Foundation +import WalletConnectSign + +class Eip155ProposalHandler { + static let namespace = "eip155" + + static let supportedEvents = [ + "chainChanged", + "accountsChanged", + ] + + private let evmBlockchainManager: EvmBlockchainManager + private let account: Account + private let supportedMethods: [String] + + init(evmBlockchainManager: EvmBlockchainManager, account: Account, supportedMethods: [String]) { + self.evmBlockchainManager = evmBlockchainManager + self.account = account + self.supportedMethods = supportedMethods + } + + private func blockchainSet(namespace: ProposalNamespace) -> WalletConnectMainModule.BlockchainSet { + var set = WalletConnectMainModule.BlockchainSet.empty + + for blockchain in namespace.chains ?? [] { + guard let chainId = Int(blockchain.reference), + let evmBlockchain = evmBlockchainManager.blockchain(chainId: chainId) else { + // can't get blockchain by chainId, or can't parse chainId + continue + } + + let chain = evmBlockchainManager.chain(blockchainType: evmBlockchain.type) + + guard let address = try? WalletConnectManager.evmAddress(account: account, chain: chain) else { + // can't get address for chain + continue + } + + set.items.insert( + WalletConnectMainModule.BlockchainItem( + namespace: blockchain.namespace, + chainId: chainId, + blockchain: evmBlockchain, + address: address.eip55 + ) + ) + } + + namespace.methods.forEach { + if supportedMethods.contains($0) { + set.methods.insert($0) + } + } + + namespace.events.forEach { + if Self.supportedEvents.contains($0) { + set.events.insert($0) + } + } + + return set + } +} + +extension Eip155ProposalHandler: IProposalHandler { + func handle(provider: INamespaceProvider) -> WalletConnectMainModule.BlockchainSet { + var set = WalletConnectMainModule.BlockchainSet.empty + + provider.get(namespace: Self.namespace).forEach { namespace in + set.formUnion(blockchainSet(namespace: namespace)) + } + + return set + } +} \ No newline at end of file diff --git a/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Main/Proposal/ProposalChain.swift b/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Main/Proposal/ProposalChain.swift new file mode 100644 index 0000000000..1a083c26ca --- /dev/null +++ b/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Main/Proposal/ProposalChain.swift @@ -0,0 +1,55 @@ +import Foundation +import WalletConnectSign + +protocol IProposalHandler { + func handle(provider: INamespaceProvider) -> WalletConnectMainModule.BlockchainSet +} + +protocol INamespaceProvider { + func get(namespace: String) -> [ProposalNamespace] +} + +extension Session.Proposal: INamespaceProvider { + func get(namespace: String) -> [ProposalNamespace] { + [requiredNamespaces[namespace], optionalNamespaces?[namespace]].compactMap { $0 } + } +} + +extension Session: INamespaceProvider { + var proposalNamespaces: [String: ProposalNamespace] { + namespaces.reduce(into: [:]) { + $0[$1.key] = ProposalNamespace( + chains: $1.value.chains, + methods: $1.value.methods, + events: $1.value.events + ) + } + } + + func get(namespace: String) -> [ProposalNamespace] { + [proposalNamespaces[namespace]] + .compactMap { $0 } + } +} + +class ProposalChain { + private var handlers = [IProposalHandler]() + + func append(handler: IProposalHandler) { + handlers.append(handler) + } +} + +extension ProposalChain: IProposalHandler { + func handle(provider: INamespaceProvider) -> WalletConnectMainModule.BlockchainSet { + var set = WalletConnectMainModule.BlockchainSet.empty + + for handler in handlers { + let result = handler.handle(provider: provider) + + set.formUnion(result) + } + + return set + } +} diff --git a/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Main/Proposal/ProposalValidator.swift b/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Main/Proposal/ProposalValidator.swift new file mode 100644 index 0000000000..b63b62c05c --- /dev/null +++ b/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Main/Proposal/ProposalValidator.swift @@ -0,0 +1,39 @@ +import Foundation +import WalletConnectSign + +class ProposalValidator { + func validate(namespaces: [String: ProposalNamespace], set: WalletConnectMainModule.BlockchainSet) throws { + for (_, namespace) in namespaces { + if let chains = namespace.chains { + try chains.forEach { blockchain in + if !set.items.contains(where: { $0.equal(blockchain: blockchain) }) { + throw ValidateError.unsupported( + namespace: blockchain.namespace, + reference: blockchain.reference + ) + } + } + } + + try namespace.methods.forEach { method in + if !set.methods.contains(method) { + throw ValidateError.unsupported(method: method) + } + } + + try namespace.events.forEach { event in + if !set.events.contains(event) { + throw ValidateError.unsupported(event: event) + } + } + } + } +} + +extension ProposalValidator { + enum ValidateError: Error { + case unsupported(namespace: String, reference: String) + case unsupported(method: String) + case unsupported(event: String) + } +} diff --git a/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Main/WalletConnectMainModule.swift b/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Main/WalletConnectMainModule.swift index 0f1c0c2b05..4991c4a5aa 100644 --- a/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Main/WalletConnectMainModule.swift +++ b/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Main/WalletConnectMainModule.swift @@ -8,8 +8,16 @@ import MarketKit struct WalletConnectMainModule { static func viewController(session: WalletConnectSign.Session? = nil, proposal: WalletConnectSign.Session.Proposal? = nil, sourceViewController: UIViewController?) -> UIViewController? { + guard let account = App.shared.accountManager.activeAccount else { + return nil + } + let service = App.shared.walletConnectSessionManager.service + let chain = ProposalChain() + let supportedMethods = App.shared.walletConnectRequestHandler.supportedMethods + chain.append(handler: Eip155ProposalHandler(evmBlockchainManager: App.shared.evmBlockchainManager, account: account, supportedMethods: supportedMethods)) + let mainService = WalletConnectMainService( session: session, proposal: proposal, @@ -17,7 +25,8 @@ struct WalletConnectMainModule { manager: App.shared.walletConnectManager, reachabilityManager: App.shared.reachabilityManager, accountManager: App.shared.accountManager, - evmBlockchainManager: App.shared.evmBlockchainManager + proposalHandler: chain, + proposalValidator: ProposalValidator() ) return viewController(service: mainService, sourceViewController: sourceViewController) @@ -25,12 +34,17 @@ struct WalletConnectMainModule { static func viewController(service: WalletConnectMainService, sourceViewController: UIViewController?) -> UIViewController? { let viewModel = WalletConnectMainViewModel(service: service) - let viewController = WalletConnectMainViewController(viewModel: viewModel, sourceViewController: sourceViewController) + let viewController = WalletConnectMainViewController( + viewModel: viewModel, + requestViewFactory: App.shared.walletConnectRequestHandler, + sourceViewController: sourceViewController + ) let pendingRequestService = WalletConnectMainPendingRequestService( service: service, accountManager: App.shared.accountManager, sessionManager: App.shared.walletConnectSessionManager, + requestHandler: App.shared.walletConnectRequestHandler, evmBlockchainManager: App.shared.evmBlockchainManager, signService: App.shared.walletConnectSessionManager.service) let pendingRequestViewModel = WalletConnectMainPendingRequestViewModel(service: pendingRequestService) @@ -54,8 +68,14 @@ extension WalletConnectMainModule { static var empty: BlockchainSet = BlockchainSet(items: Set(), methods: Set(), events: Set()) var items: Set - let methods: Set - let events: Set + var methods: Set + var events: Set + + mutating func formUnion(_ set: Self) { + items.formUnion(set.items) + methods.formUnion(set.methods) + events.formUnion(set.events) + } } struct BlockchainItem: Hashable { @@ -63,7 +83,6 @@ extension WalletConnectMainModule { let chainId: Int let blockchain: MarketKit.Blockchain let address: String - let selected: Bool func hash(into hasher: inout Hasher) { hasher.combine(chainId) @@ -73,6 +92,9 @@ extension WalletConnectMainModule { lhs.chainId == rhs.chainId } + func equal(blockchain: WalletConnectSign.Blockchain) -> Bool { + namespace == blockchain.namespace && chainId.description == blockchain.reference + } } enum State: Equatable { diff --git a/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Main/WalletConnectMainService.swift b/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Main/WalletConnectMainService.swift index 97678be359..159584fce7 100644 --- a/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Main/WalletConnectMainService.swift +++ b/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Main/WalletConnectMainService.swift @@ -12,7 +12,8 @@ class WalletConnectMainService { private let manager: WalletConnectManager private let reachabilityManager: IReachabilityManager private let accountManager: AccountManager - private let evmBlockchainManager: EvmBlockchainManager + private let proposalHandler: IProposalHandler + private let proposalValidator: ProposalValidator private var proposal: WalletConnectSign.Session.Proposal? private(set) var session: WalletConnectSign.Session? { @@ -22,7 +23,7 @@ class WalletConnectMainService { } private let connectionStateRelay = PublishRelay() - private let requestRelay = PublishRelay() + private let requestRelay = PublishRelay() private let errorRelay = PublishRelay() private let sessionUpdatedRelay = PublishRelay() @@ -39,20 +40,22 @@ class WalletConnectMainService { } } - init(session: WalletConnectSign.Session? = nil, proposal: WalletConnectSign.Session.Proposal? = nil, service: WalletConnectService, manager: WalletConnectManager, reachabilityManager: IReachabilityManager, accountManager: AccountManager, evmBlockchainManager: EvmBlockchainManager) { + init(session: WalletConnectSign.Session? = nil, proposal: WalletConnectSign.Session.Proposal? = nil, service: WalletConnectService, manager: WalletConnectManager, reachabilityManager: IReachabilityManager, accountManager: AccountManager, proposalHandler: IProposalHandler, proposalValidator: ProposalValidator) { self.session = session self.proposal = proposal self.service = service self.manager = manager self.reachabilityManager = reachabilityManager self.accountManager = accountManager - self.evmBlockchainManager = evmBlockchainManager + self.proposalHandler = proposalHandler + self.proposalValidator = proposalValidator subscribe(disposeBag, service.receiveProposalObservable) { [weak self] in self?.proposal = $0 self?.sync(proposal: $0) } subscribe(disposeBag, service.receiveSessionObservable) { [weak self] in + self?.session = $0 self?.didReceive(session: $0) } subscribe(disposeBag, service.deleteSessionObservable) { [weak self] in @@ -64,14 +67,7 @@ class WalletConnectMainService { connectionStateRelay.accept(service.socketConnectionStatus == .connected ? .connected : .disconnected) if let session { - state = .ready - do { - blockchains = try blockchains(by: session) - allowedBlockchainsRelay.accept(allowedBlockchains) - } catch { - state = .invalid(error: WalletConnectMainModule.SessionError.noAnySupportedChainId) - return - } + didReceive(session: session) } if let proposal { @@ -81,7 +77,10 @@ class WalletConnectMainService { private func sync(proposal: WalletConnectSign.Session.Proposal) { do { - blockchains = try blockchains(by: proposal) + let blockchains = proposalHandler.handle(provider: proposal) + try proposalValidator.validate(namespaces: proposal.requiredNamespaces, set: blockchains) + + self.blockchains = blockchains allowedBlockchainsRelay.accept(allowedBlockchains) guard !blockchains.items.isEmpty else { @@ -97,9 +96,11 @@ class WalletConnectMainService { } private func didReceive(session: WalletConnectSign.Session) { - self.session = session do { - blockchains = try blockchains(by: session) + let blockchains = proposalHandler.handle(provider: session) + try proposalValidator.validate(namespaces: session.proposalNamespaces, set: blockchains) + + self.blockchains = blockchains allowedBlockchainsRelay.accept(allowedBlockchains) state = .ready @@ -117,78 +118,6 @@ class WalletConnectMainService { state = .killed(reason: .killSession) // todo: ??? } - private func blockchains(by session: WalletConnectSign.Session) throws -> WalletConnectMainModule.BlockchainSet { - guard let account = accountManager.activeAccount, - let eip155 = session.namespaces["eip155"] else { - throw WalletConnectMainModule.SessionError.unsupportedChainId - } - - let wcBlockchains = eip155.accounts.map { $0.blockchain } - let items = blockchainItems(blockchains: wcBlockchains, account: account, selected: true) - return .init(items: Set(items), methods: eip155.methods, events: eip155.events) - } - - private func blockchains(by proposal: WalletConnectSign.Session.Proposal) throws -> WalletConnectMainModule.BlockchainSet { - guard let account = accountManager.activeAccount else { - return .empty - } - // check that we have only eip155 namespace for working - - var items = [WalletConnectMainModule.BlockchainItem]() - if proposal.requiredNamespaces.count == 0 { - // do nothing - } else if proposal.requiredNamespaces.count == 1, let requiredEip155 = proposal.requiredNamespaces["eip155"] { - // no any chains to sign - guard let wcRequiredChains = requiredEip155.chains?.compactMap({ $0 }) else { - return .empty - } - - items = blockchainItems(blockchains: wcRequiredChains, account: account, selected: true) - // We must sign all required chains - guard items.count == wcRequiredChains.count else { - throw WalletConnectMainModule.SessionError.unsupportedChainId - } - } else { - throw WalletConnectMainModule.SessionError.unsupportedChainId - } - // Add all optionals chains from proposal - - guard let eip155 = proposal.requiredNamespaces["eip155"] ?? proposal.optionalNamespaces?["eip155"] else { - throw WalletConnectMainModule.SessionError.unsupportedChainId - } - - if let optionalEip155 = proposal.optionalNamespaces?["eip155"], - let optionalChains = optionalEip155.chains?.compactMap({ $0 }) { - - items.append(contentsOf: blockchainItems(blockchains: optionalChains, account: account, selected: false)) - } - - - return .init(items: Set(items), methods: eip155.methods, events: eip155.events) - } - - private func blockchainItems(blockchains: [WalletConnectUtils.Blockchain], account: Account, selected: Bool) -> [WalletConnectMainModule.BlockchainItem] { - blockchains.compactMap { wcBlockchain in - guard let chainId = Int(wcBlockchain.reference), - let blockchain = evmBlockchainManager.blockchain(chainId: chainId) else { - // not valid chainId for eip155 or not supported blockchain - return nil - } - let chain = evmBlockchainManager.chain(blockchainType: blockchain.type) - - guard let address = try? WalletConnectManager.evmAddress(account: account, chain: chain) else { - // can't get address for chain - return nil - } - return WalletConnectMainModule.BlockchainItem( - namespace: wcBlockchain.namespace, - chainId: chainId, - blockchain: blockchain, - address: address.eip55, - selected: selected) - } - } - } extension WalletConnectMainService { @@ -272,29 +201,6 @@ extension WalletConnectMainService { allowedBlockchainsRelay.asObservable() } - func select(chainId: Int) { - // not required for V2 // todo: Refactor and remove - } - - func toggle(chainId: Int) { - guard let blockchain = blockchains.items.first(where: { $0.chainId == chainId }) else { - return - } - if blockchain.selected, blockchains.items.filter({ $0.selected }).count < 2 { - return - } - - let toggledBlockchain = WalletConnectMainModule.BlockchainItem( - namespace: "eip155", - chainId: chainId, - blockchain: blockchain.blockchain, - address: blockchain.address, - selected: !blockchain.selected - ) - blockchains.items.update(with: toggledBlockchain) - allowedBlockchainsRelay.accept(allowedBlockchains) - } - func reconnect() { guard session != nil else { return @@ -321,28 +227,22 @@ extension WalletConnectMainService { return } - let chains = evmBlockchainManager.allBlockchains.compactMap { blockchain in - evmBlockchainManager.chain(blockchainType: blockchain.type) - } - - let accounts = chains.compactMap { chain in - if let firstBlockchainItem = blockchains.items.first(where: { item in item.chainId == chain.id }), - let wcBlockchain = WalletConnectUtils.Blockchain(namespace: firstBlockchainItem.namespace, reference: chain.id.description), - let wcAccount = WalletConnectUtils.Account(blockchain: wcBlockchain, address: firstBlockchainItem.address) { - return wcAccount - } - return nil - } - - guard !accounts.isEmpty else { - state = .invalid(error: WalletConnectMainModule.SessionError.noAnySupportedChainId) - return + //todo: check + let accounts: [WalletConnectUtils.Account] = blockchains.items.compactMap { item in + Blockchain( + namespace: item.namespace, + reference: item.chainId.description) + .flatMap { chain in + WalletConnectUtils.Account( + blockchain: chain, + address: item.address + ) + } } - let set = Set(accounts) Task { [weak self, service, blockchains] in do { - try await service.approve(proposal: proposal, accounts: set, methods: blockchains.methods, events: blockchains.events) + try await service.approve(proposal: proposal, accounts: Set(accounts), methods: blockchains.methods, events: blockchains.events) } catch { self?.errorRelay.accept(error) } diff --git a/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Main/WalletConnectMainViewController.swift b/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Main/WalletConnectMainViewController.swift index 69bcc45a9d..1113580e54 100644 --- a/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Main/WalletConnectMainViewController.swift +++ b/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Main/WalletConnectMainViewController.swift @@ -1,18 +1,20 @@ -import UIKit -import ThemeKit -import RxSwift -import RxCocoa -import UIExtensions +import ComponentKit import HUD +import RxCocoa +import RxSwift import SectionsTableView import SnapKit -import ComponentKit +import ThemeKit +import UIExtensions +import UIKit class WalletConnectMainViewController: ThemeViewController { - private let viewModel: WalletConnectMainViewModel private let disposeBag = DisposeBag() private var pendingRequestDisposeBag = DisposeBag() + private let viewModel: WalletConnectMainViewModel + private let requestViewFactory: IWalletConnectRequestViewFactory + private weak var sourceViewController: UIViewController? var pendingRequestViewModel: WalletConnectMainPendingRequestViewModel? { @@ -28,6 +30,7 @@ class WalletConnectMainViewController: ThemeViewController { } } } + private var pendingRequestViewItems = [WalletConnectMainPendingRequestViewModel.ViewItem]() private let spinner = HUDActivityView.create(with: .large48) @@ -41,14 +44,16 @@ class WalletConnectMainViewController: ThemeViewController { private var viewItem: WalletConnectMainViewModel.ViewItem? - init(viewModel: WalletConnectMainViewModel, sourceViewController: UIViewController?) { + init(viewModel: WalletConnectMainViewModel, requestViewFactory: IWalletConnectRequestViewFactory, sourceViewController: UIViewController?) { self.viewModel = viewModel + self.requestViewFactory = requestViewFactory self.sourceViewController = sourceViewController super.init() } - required public init?(coder aDecoder: NSCoder) { + @available(*, unavailable) + public required init?(coder _: NSCoder) { fatalError("init(coder:) has not been implemented") } @@ -195,31 +200,6 @@ class WalletConnectMainViewController: ThemeViewController { sourceViewController?.dismiss(animated: true) } - private func openSelectNetwork() { - let viewItems = viewModel.blockchainSelectorViewItems - - let selectorViewItems = viewItems.map { - SelectorModule.ViewItem( - image: .url($0.imageUrl, placeholder: "placeholder_rectangle_32"), - title: $0.title, - selected: $0.selected - ) - } - - let viewController = SelectorModule.bottomSingleSelectorViewController( - image: .local(image: UIImage(named: "blocks_24")?.withTintColor(.themeJacob)), - title: "wallet_connect.network".localized, - viewItems: selectorViewItems, - onSelect: { [weak self] index in - self?.viewModel.onSelect(chainId: viewItems[index].chainId) - } - ) - - DispatchQueue.main.async { - self.present(viewController, animated: true) - } - } - // pending requests section private func sync(pendingRequestViewItems: [WalletConnectMainPendingRequestViewModel.ViewItem]) { @@ -237,18 +217,19 @@ class WalletConnectMainViewController: ThemeViewController { } private func showPending(request: WalletConnectRequest) { - guard let viewController = WalletConnectRequestModule.viewController(signService: App.shared.walletConnectSessionManager.service, request: request) else { + let result = requestViewFactory.viewController(request: request) + switch result { + case let .unsuccessful(error): + print("Can't create view") return + case let .controller(controller): + guard let controller else { return } + present(ThemeNavigationController(rootViewController: controller), animated: true) } - - present(ThemeNavigationController(rootViewController: viewController), animated: true) } - - } extension WalletConnectMainViewController: SectionsDataSource { - private func pendingRequestCell(viewItem: WalletConnectMainPendingRequestViewModel.ViewItem, isFirst: Bool, isLast: Bool) -> RowProtocol { var elements: [CellBuilderNew.CellElement] = [ .vStackCentered([ @@ -263,8 +244,8 @@ extension WalletConnectMainViewController: SectionsDataSource { component.textColor = .themeGray component.lineBreakMode = .byTruncatingMiddle component.text = viewItem.subtitle - } - ]) + }, + ]), ] if viewItem.unsupported { @@ -283,15 +264,15 @@ extension WalletConnectMainViewController: SectionsDataSource { } return CellBuilderNew.row( - rootElement: .hStack(elements), - tableView: tableView, - id: "request_item_\(viewItem.id)", - height: .heightDoubleLineCell, - autoDeselect: true, - bind: { cell in - cell.set(backgroundStyle: .lawrence, isFirst: isFirst, isLast: isLast) - }, - action: { [weak self] in self?.onSelect(requestId: viewItem.id) } + rootElement: .hStack(elements), + tableView: tableView, + id: "request_item_\(viewItem.id)", + height: .heightDoubleLineCell, + autoDeselect: true, + bind: { cell in + cell.set(backgroundStyle: .lawrence, isFirst: isFirst, isLast: isLast) + }, + action: { [weak self] in self?.onSelect(requestId: viewItem.id) } ) } @@ -300,23 +281,22 @@ extension WalletConnectMainViewController: SectionsDataSource { return nil } return Section(id: "pending-requests", - headerState: tableView.sectionHeader(text: "wallet_connect.list.pending_requests".localized), - footerState: .margin(height: .margin32), - rows: pendingRequestViewItems.enumerated().map { index, viewItem in - pendingRequestCell(viewItem: viewItem, isFirst: index == 0, isLast: index == pendingRequestViewItems.count - 1) - } - ) + headerState: tableView.sectionHeader(text: "wallet_connect.list.pending_requests".localized), + footerState: .margin(height: .margin32), + rows: pendingRequestViewItems.enumerated().map { index, viewItem in + pendingRequestCell(viewItem: viewItem, isFirst: index == 0, isLast: index == pendingRequestViewItems.count - 1) + }) } private func headerRow(imageUrl: String?, title: String) -> RowProtocol { Row( - id: "header", - hash: "\(title)-\(imageUrl ?? "N/A")", - height: LogoHeaderCell.height, - bind: { cell, _ in - cell.title = title - cell.set(imageUrl: imageUrl) - } + id: "header", + hash: "\(title)-\(imageUrl ?? "N/A")", + height: LogoHeaderCell.height, + bind: { cell, _ in + cell.title = title + cell.set(imageUrl: imageUrl) + } ) } @@ -327,7 +307,7 @@ extension WalletConnectMainViewController: SectionsDataSource { if let viewItem = viewItem { if let dAppMeta = viewItem.dAppMeta { sections.append(Section(id: "dapp-meta", - rows: [headerRow(imageUrl: dAppMeta.icon, title: dAppMeta.name)])) + rows: [headerRow(imageUrl: dAppMeta.icon, title: dAppMeta.name)])) } if let pendingRequestSection = pendingRequestSection() { @@ -348,65 +328,22 @@ extension WalletConnectMainViewController: SectionsDataSource { rowInfos.append(.value(title: "wallet_connect.active_account".localized, value: accountName, valueColor: nil)) } - if viewItem.networkEditable { - if let address = viewItem.address { - rowInfos.append(.value(title: "wallet_connect.address".localized, value: address, valueColor: nil)) - } - - if let network = viewItem.network { - rowInfos.append(.network(value: network, editable: true)) - } - } else { - if let network = viewItem.network, let address = viewItem.address { - rowInfos.append(.value(title: network, value: address, valueColor: nil)) - } - } - for (index, rowInfo) in rowInfos.enumerated() { let isFirst = index == 0 let isLast = index == rowInfos.count - 1 switch rowInfo { case let .value(title, value, valueColor): - rows.append(tableView.universalRow48( + rows.append( + tableView.universalRow48( id: "value-\(index)", title: .subhead2(title), value: .subhead1(value, color: valueColor ?? .themeLeah), hash: value, isFirst: isFirst, isLast: isLast - )) - case let .network(value, editable): - let row = tableView.universalRow48( - id: "network-\(index)", - title: .subhead2("wallet_connect.network".localized), - value: .subhead1(value), - accessoryType: .dropdown, - hash: value, - autoDeselect: true, - isFirst: isFirst, - isLast: isLast, - action: editable ? { [weak self] in - self?.openSelectNetwork() - } : nil - ) - rows.append(row) - case let .chain(title, value, selected, chainId): - let row = tableView.universalRow48( - id: "chain-\(index)", - image: .local(selected ? UIImage(named: "checkbox_active_24") : UIImage(named: "checkbox_diactive_24")), - title: .subhead2(title), - value: .subhead1(value), - hash: "\(selected)", - autoDeselect: true, - isFirst: isFirst, - isLast: isLast, - action: { [weak self] in - self?.viewModel.onToggle(chainId: chainId) - } + ) ) - - rows.append(row) } } @@ -418,15 +355,10 @@ extension WalletConnectMainViewController: SectionsDataSource { sections.append(Section(id: "wallet_connect", rows: rows)) return sections } - } extension WalletConnectMainViewController { - enum RowInfo { case value(title: String, value: String, valueColor: UIColor?) - case network(value: String, editable: Bool) - case chain(title: String, value: String, selected: Bool, chainId: Int) } - } diff --git a/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Main/WalletConnectMainViewModel.swift b/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Main/WalletConnectMainViewModel.swift index aad9d35164..f84f23bd5a 100644 --- a/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Main/WalletConnectMainViewModel.swift +++ b/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Main/WalletConnectMainViewModel.swift @@ -80,10 +80,9 @@ class WalletConnectMainViewModel { let blockchains = allowedBlockchains .map { item in BlockchainViewItem( - chainId: item.chainId, - chainTitle: item.blockchain.name, - address: item.address.shortened, - selected: item.selected + chainId: item.chainId, + chainTitle: item.blockchain.name, + address: item.address.shortened ) } @@ -91,9 +90,6 @@ class WalletConnectMainViewModel { dAppMeta: service.appMetaItem.map { dAppMetaViewItem(appMetaItem: $0) }, status: status(connectionState: connectionState), activeAccountName: service.activeAccountName, - address: nil, - network: nil, - networkEditable: false, blockchains: blockchains, hint: service.hint ) @@ -168,25 +164,6 @@ extension WalletConnectMainViewModel { finishRelay.asSignal() } - var blockchainSelectorViewItems: [BlockchainSelectorViewItem] { - service.allowedBlockchains.map { item in - BlockchainSelectorViewItem( - chainId: item.chainId, - title: item.blockchain.name, - imageUrl: item.blockchain.type.imageUrl, - selected: item.selected - ) - } - } - - func onSelect(chainId: Int) { - service.select(chainId: chainId) - } - - func onToggle(chainId: Int) { - service.toggle(chainId: chainId) - } - func cancel() { if service.connectionState == .connected && service.state == .waitingForApproveSession { service.rejectSession() @@ -224,11 +201,6 @@ extension WalletConnectMainViewModel { let status: Status? let activeAccountName: String? - // v1 - let address: String? - let network: String? - let networkEditable: Bool - // v2 let blockchains: [BlockchainViewItem]? @@ -245,7 +217,6 @@ extension WalletConnectMainViewModel { let chainId: Int let chainTitle: String? let address: String - let selected: Bool } struct BlockchainSelectorViewItem { diff --git a/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/PendingRequests/V2/WalletConnectPendingRequestsModule.swift b/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/PendingRequests/V2/WalletConnectPendingRequestsModule.swift index 0180345ad4..98ded753e7 100644 --- a/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/PendingRequests/V2/WalletConnectPendingRequestsModule.swift +++ b/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/PendingRequests/V2/WalletConnectPendingRequestsModule.swift @@ -7,12 +7,16 @@ struct WalletConnectPendingRequestsModule { let service = WalletConnectPendingRequestsService( sessionManager: App.shared.walletConnectSessionManager, accountManager: App.shared.accountManager, + requestHandler: App.shared.walletConnectRequestHandler, evmBlockchainManager: App.shared.evmBlockchainManager, signService: App.shared.walletConnectSessionManager.service ) let viewModel = WalletConnectPendingRequestsViewModel(service: service) - return WalletConnectPendingRequestsViewController(viewModel: viewModel) + return WalletConnectPendingRequestsViewController( + viewModel: viewModel, + requestViewFactory: App.shared.walletConnectRequestHandler + ) } } diff --git a/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/PendingRequests/V2/WalletConnectPendingRequestsService.swift b/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/PendingRequests/V2/WalletConnectPendingRequestsService.swift index 3597715365..19d3c4ed3c 100644 --- a/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/PendingRequests/V2/WalletConnectPendingRequestsService.swift +++ b/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/PendingRequests/V2/WalletConnectPendingRequestsService.swift @@ -6,6 +6,7 @@ class WalletConnectPendingRequestsService { private let sessionManager: WalletConnectSessionManager private let accountManager: AccountManager + private let requestHandler: IWalletConnectRequestHandler private let evmBlockchainManager: EvmBlockchainManager private let signService: IWalletConnectSignService @@ -20,9 +21,10 @@ class WalletConnectPendingRequestsService { private let showPendingRequestRelay = PublishRelay() - init(sessionManager: WalletConnectSessionManager, accountManager: AccountManager, evmBlockchainManager: EvmBlockchainManager, signService: IWalletConnectSignService) { + init(sessionManager: WalletConnectSessionManager, accountManager: AccountManager, requestHandler: IWalletConnectRequestHandler, evmBlockchainManager: EvmBlockchainManager, signService: IWalletConnectSignService) { self.sessionManager = sessionManager self.accountManager = accountManager + self.requestHandler = requestHandler self.evmBlockchainManager = evmBlockchainManager self.signService = signService @@ -106,25 +108,17 @@ extension WalletConnectPendingRequestsService { guard let request = sessionManager.pendingRequests().first(where: { $0.id.intValue == requestId }) else { return } - let session = sessionManager.sessions.first { $0.topic == request.topic } - - guard let chainId = Int(request.chainId.reference), - let blockchain = evmBlockchainManager.blockchain(chainId: chainId), - let account = accountManager.activeAccount, - let address = try? WalletConnectManager.evmAddress( - account: account, - chain: evmBlockchainManager.chain(blockchainType: blockchain.type) - ) else { + guard let session = sessionManager.sessions.first(where: { $0.topic == request.topic }) else { return } - - let chain = WalletConnectRequest.Chain(id: chainId, chainName: blockchain.name, address: address.eip55) - - guard let wcRequest = try? WalletConnectRequestMapper.map(dAppName: session?.peer.name, chain: chain, request: request) else { - return + let result = requestHandler.handle(session: session, request: request) + switch result { + case let .unsuccessful(error): + print("Cant select request because: \(error)") + case .handled: () + case let .request(request): + showPendingRequestRelay.accept(request) } - - showPendingRequestRelay.accept(wcRequest) } func select(accountId: String) { diff --git a/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/PendingRequests/V2/WalletConnectPendingRequestsViewController.swift b/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/PendingRequests/V2/WalletConnectPendingRequestsViewController.swift index 1683a30e4a..71661007a1 100644 --- a/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/PendingRequests/V2/WalletConnectPendingRequestsViewController.swift +++ b/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/PendingRequests/V2/WalletConnectPendingRequestsViewController.swift @@ -1,11 +1,12 @@ -import UIKit +import ComponentKit +import RxSwift import SectionsTableView import ThemeKit -import RxSwift -import ComponentKit +import UIKit class WalletConnectPendingRequestsViewController: ThemeViewController { private let viewModel: WalletConnectPendingRequestsViewModel + private let requestViewFactory: IWalletConnectRequestViewFactory private let disposeBag = DisposeBag() private let tableView = SectionsTableView(style: .grouped) @@ -13,15 +14,16 @@ class WalletConnectPendingRequestsViewController: ThemeViewController { private var viewItems = [WalletConnectPendingRequestsViewModel.SectionViewItem]() - init(viewModel: WalletConnectPendingRequestsViewModel) { + init(viewModel: WalletConnectPendingRequestsViewModel, requestViewFactory: IWalletConnectRequestViewFactory) { self.viewModel = viewModel - + self.requestViewFactory = requestViewFactory super.init() hidesBottomBarWhenPushed = true } - required init?(coder aDecoder: NSCoder) { + @available(*, unavailable) + required init?(coder _: NSCoder) { fatalError("init(coder:) has not been implemented") } @@ -76,41 +78,45 @@ class WalletConnectPendingRequestsViewController: ThemeViewController { } private func showPending(request: WalletConnectRequest) { - guard let viewController = WalletConnectRequestModule.viewController(signService: App.shared.walletConnectSessionManager.service, request: request) else { + let result = requestViewFactory.viewController(request: request) + switch result { + case let .unsuccessful(error): + print("Can't create view") return + case let .controller(controller): + guard let controller else { return } + present(ThemeNavigationController(rootViewController: controller), animated: true) } - - present(ThemeNavigationController(rootViewController: viewController), animated: true) } - private func accountCell(id: String, title: String, selected: Bool, action: @escaping () -> ()) -> RowProtocol { + private func accountCell(id: String, title: String, selected: Bool, action: @escaping () -> Void) -> RowProtocol { CellBuilderNew.row( - rootElement: .hStack([ - .image24 { (component: ImageComponent) -> () in - if selected { - component.imageView.image = UIImage(named: "circle_radioon_24")?.withRenderingMode(.alwaysTemplate) - component.imageView.tintColor = .themeJacob - } else { - component.imageView.image = UIImage(named: "circle_radiooff_24")?.withRenderingMode(.alwaysTemplate) - component.imageView.tintColor = .themeGray - } - }, - .textElement(text: .body(title)), - .secondaryButton { (component: SecondaryButtonComponent) -> () in - component.isHidden = !selected - component.button.set(style: .default) - component.button.setTitle("Switch", for: .normal) - component.onTap = action + rootElement: .hStack([ + .image24 { (component: ImageComponent) in + if selected { + component.imageView.image = UIImage(named: "circle_radioon_24")?.withRenderingMode(.alwaysTemplate) + component.imageView.tintColor = .themeJacob + } else { + component.imageView.image = UIImage(named: "circle_radiooff_24")?.withRenderingMode(.alwaysTemplate) + component.imageView.tintColor = .themeGray } - ]), - tableView: tableView, - id: "account-\(selected)-\(title)-cell", - height: .heightCell48, - autoDeselect: true, - bind: { cell in - cell.set(backgroundStyle: .lawrence, isFirst: true, isLast: false) }, - action: !selected ? { [weak self] in self?.onSelect(accountId: id) } : nil + .textElement(text: .body(title)), + .secondaryButton { (component: SecondaryButtonComponent) in + component.isHidden = !selected + component.button.set(style: .default) + component.button.setTitle("Switch", for: .normal) + component.onTap = action + }, + ]), + tableView: tableView, + id: "account-\(selected)-\(title)-cell", + height: .heightCell48, + autoDeselect: true, + bind: { cell in + cell.set(backgroundStyle: .lawrence, isFirst: true, isLast: false) + }, + action: !selected ? { [weak self] in self?.onSelect(accountId: id) } : nil ) } @@ -120,11 +126,11 @@ class WalletConnectPendingRequestsViewController: ThemeViewController { footerState: sectionViewItem.selected ? .margin(height: .margin32) : tableView.sectionFooter(text: "wallet_connect.pending_requests.nonactive_footer".localized), rows: [ accountCell( - id: sectionViewItem.id, - title: sectionViewItem.title, - selected: sectionViewItem.selected, - action: { [weak self] in self?.onSelect(accountId: sectionViewItem.id) } - ) + id: sectionViewItem.id, + title: sectionViewItem.title, + selected: sectionViewItem.selected, + action: { [weak self] in self?.onSelect(accountId: sectionViewItem.id) } + ), ] + sectionViewItem.viewItems.enumerated().map { index, viewItem in let selected = sectionViewItem.selected @@ -144,8 +150,8 @@ class WalletConnectPendingRequestsViewController: ThemeViewController { component.textColor = selected ? .themeGray : .themeGray50 component.lineBreakMode = .byTruncatingMiddle component.text = viewItem.subtitle - } - ]) + }, + ]), ] var tappable = false @@ -168,30 +174,26 @@ class WalletConnectPendingRequestsViewController: ThemeViewController { } return CellBuilderNew.row( - rootElement: .hStack(elements), - tableView: tableView, - id: "item_\(index)", - height: .heightDoubleLineCell, - autoDeselect: true, - bind: { cell in - cell.set(backgroundStyle: .lawrence, isFirst: false, isLast: index == sectionViewItem.viewItems.count - 1) - }, - action: tappable ? { [weak self] in self?.onSelect(requestId: viewItem.id) } : nil + rootElement: .hStack(elements), + tableView: tableView, + id: "item_\(index)", + height: .heightDoubleLineCell, + autoDeselect: true, + bind: { cell in + cell.set(backgroundStyle: .lawrence, isFirst: false, isLast: index == sectionViewItem.viewItems.count - 1) + }, + action: tappable ? { [weak self] in self?.onSelect(requestId: viewItem.id) } : nil ) - } - ) + }) } private func onTapReject(viewItem: WalletConnectPendingRequestsViewModel.ViewItem) { viewModel.onReject(id: viewItem.id) } - } extension WalletConnectPendingRequestsViewController: SectionsDataSource { - func buildSections() -> [SectionProtocol] { viewItems.map { section(sectionViewItem: $0) } } - } diff --git a/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Request/Handlers/Eip155RequestFactory.swift b/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Request/Handlers/Eip155RequestFactory.swift new file mode 100644 index 0000000000..2517de9aa0 --- /dev/null +++ b/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Request/Handlers/Eip155RequestFactory.swift @@ -0,0 +1,41 @@ +import Foundation +import WalletConnectSign + +class Eip155RequestFactory { + let evmBlockchainManager: EvmBlockchainManager + let accountManager: AccountManager + + init(evmBlockchainManager: EvmBlockchainManager, accountManager: AccountManager) { + self.evmBlockchainManager = evmBlockchainManager + self.accountManager = accountManager + } +} + +extension Eip155RequestFactory { + func request(request: Request, payload: WCRequestPayload) throws -> WalletConnectRequest { + guard let account = accountManager.activeAccount else { + throw WalletConnectRequest.CreationError.noActiveAccount + } + + guard let chainId = Int(request.chainId.reference), + let blockchain = evmBlockchainManager.blockchain(chainId: chainId) else { + throw WalletConnectRequest.CreationError.invalidChain + } + + guard let address = try? WalletConnectManager.evmAddress( + account: account, + chain: evmBlockchainManager.chain(blockchainType: blockchain.type) + ) + else { + throw WalletConnectRequest.CreationError.cantCreateAddress + } + + let chain = WalletConnectRequest.Chain(id: chainId, chainName: blockchain.name, address: address.eip55) + + return WalletConnectRequest( + id: request.id.intValue, + chain: chain, + payload: payload + ) + } +} diff --git a/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Request/Handlers/EthereumTransaction/WCEthereumTransactionHandler.swift b/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Request/Handlers/EthereumTransaction/WCEthereumTransactionHandler.swift new file mode 100644 index 0000000000..681556950c --- /dev/null +++ b/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Request/Handlers/EthereumTransaction/WCEthereumTransactionHandler.swift @@ -0,0 +1,39 @@ +import Foundation +import UIKit +import WalletConnectSign + +class WCEthereumTransactionHandler: WalletConnectRequestHandler { + override var method: String { Payload.method } + let requestFactory: Eip155RequestFactory + + init(requestFactory: Eip155RequestFactory) { + self.requestFactory = requestFactory + } +} + +extension WCEthereumTransactionHandler: IWalletConnectRequestHandler { + func handle(session: Session, request: Request) -> WalletConnectRequestChain.RequestResult { + guard request.method == Payload.method else { + return .unsuccessful(error: WCRequestPayload.ParsingError.cantParseRequest) + } + + do { + let payload = try Payload(dAppName: session.peer.name, from: request.params) + let request = try requestFactory.request(request: request, payload: payload) + return .request(request) + } catch { + return .unsuccessful(error: error) + } + } +} + +extension WCEthereumTransactionHandler: IWalletConnectRequestViewFactory { + func viewController(request: WalletConnectRequest) -> WalletConnectRequestChain.ViewFactoryResult { + guard request.payload is WCEthereumTransactionPayload else { + return .unsuccessful(error: WalletConnectRequestChain.ViewFactoryError.cantRecognizeHandler) + } + + let controller = Payload.module(request: request) + return .controller(controller) + } +} diff --git a/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Request/Handlers/EthereumTransaction/WCEthereumTransactionPayload.swift b/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Request/Handlers/EthereumTransaction/WCEthereumTransactionPayload.swift new file mode 100644 index 0000000000..0a2b28dddc --- /dev/null +++ b/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Request/Handlers/EthereumTransaction/WCEthereumTransactionPayload.swift @@ -0,0 +1,43 @@ +import Foundation +import UIKit +import WalletConnectSign + +class WCEthereumTransactionPayload: WCRequestPayload { + class var method: String { "" } + override var method: String { Self.method } + + let transaction: WalletConnectTransaction + + init(dAppName: String, transaction: WalletConnectTransaction, data: Data) { + self.transaction = transaction + super.init(dAppName: dAppName, data: data) + } + + required public convenience init(dAppName: String, from anyCodable: AnyCodable) throws { + guard let transactions = try? anyCodable.get([WCEthereumTransaction].self), + let wcTransaction = transactions.first else { + throw WCRequestPayload.ParsingError.badJSONRPCRequest + } + + let transaction = try WalletConnectTransaction(transaction: wcTransaction) + self.init(dAppName: dAppName, transaction: transaction, data: anyCodable.encoded) + } + + class func module(request: WalletConnectRequest) -> UIViewController? { + nil + } +} + +class WCSendEthereumTransactionPayload: WCEthereumTransactionPayload { + override class var method: String { "eth_sendTransaction" } + override class func module(request: WalletConnectRequest) -> UIViewController? { + WalletConnectSendEthereumTransactionRequestModule.viewController(request: request) + } +} + +class WCSignEthereumTransactionPayload: WCEthereumTransactionPayload { + override class var method: String { "eth_signTransaction" } + override class func module(request: WalletConnectRequest) -> UIViewController? { + WalletConnectSignMessageRequestModule.viewController(request: request) + } +} diff --git a/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Request/Handlers/EthereumTransaction/WalletConnectTransaction.swift b/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Request/Handlers/EthereumTransaction/WalletConnectTransaction.swift new file mode 100644 index 0000000000..0dd4cac342 --- /dev/null +++ b/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Request/Handlers/EthereumTransaction/WalletConnectTransaction.swift @@ -0,0 +1,53 @@ +import Foundation +import EvmKit +import BigInt + +struct WCEthereumTransaction: Codable { + public let from: String + public let to: String? + public let nonce: String? + public let gasPrice: String? + public let gas: String? + public let gasLimit: String? // legacy gas limit + public let maxPriorityFeePerGas: String? + public let maxFeePerGas: String? + public let type: String? + public let value: String? + public let data: String +} + +struct WalletConnectTransaction { + let from: EvmKit.Address + let to: EvmKit.Address + let nonce: Int? + let gasPrice: Int? + let gasLimit: Int? + let maxPriorityFeePerGas: Int? + let maxFeePerGas: Int? + let type: Int? + let value: BigUInt + let data: Data + + init(transaction: WCEthereumTransaction) throws { + guard let to = transaction.to else { + throw TransactionError.noRecipient + } + + from = try EvmKit.Address(hex: transaction.from) + self.to = try EvmKit.Address(hex: to) + nonce = transaction.nonce.flatMap { Int($0.replacingOccurrences(of: "0x", with: ""), radix: 16) } + gasPrice = transaction.gasPrice.flatMap { Int($0.replacingOccurrences(of: "0x", with: ""), radix: 16) } + gasLimit = (transaction.gas ?? transaction.gasLimit).flatMap { Int($0.replacingOccurrences(of: "0x", with: ""), radix: 16) } + maxPriorityFeePerGas = transaction.maxPriorityFeePerGas.flatMap { Int($0.replacingOccurrences(of: "0x", with: ""), radix: 16) } + maxFeePerGas = transaction.maxFeePerGas.flatMap { Int($0.replacingOccurrences(of: "0x", with: ""), radix: 16) } + type = transaction.type.flatMap { Int($0.replacingOccurrences(of: "0x", with: ""), radix: 16) } + value = transaction.value.flatMap { BigUInt($0.replacingOccurrences(of: "0x", with: ""), radix: 16) } ?? 0 + data = Data(hex: transaction.data) + } +} + +extension WalletConnectTransaction { + enum TransactionError: Error { + case noRecipient + } +} diff --git a/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Request/Handlers/Sign/WCSignMessageHandler.swift b/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Request/Handlers/Sign/WCSignMessageHandler.swift new file mode 100644 index 0000000000..f0fc36f1c9 --- /dev/null +++ b/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Request/Handlers/Sign/WCSignMessageHandler.swift @@ -0,0 +1,41 @@ +import Foundation + +import Foundation +import UIKit +import WalletConnectSign + +class WCSignMessageHandler: WalletConnectRequestHandler { + override var method: String { Payload.method } + let requestFactory: Eip155RequestFactory + + init(requestFactory: Eip155RequestFactory) { + self.requestFactory = requestFactory + } +} + +extension WCSignMessageHandler: IWalletConnectRequestHandler { + func handle(session: Session, request: Request) -> WalletConnectRequestChain.RequestResult { + guard request.method == Payload.method else { + return .unsuccessful(error: WCRequestPayload.ParsingError.cantParseRequest) + } + + do { + let payload = try Payload(dAppName: session.peer.name, from: request.params) + let request = try requestFactory.request(request: request, payload: payload) + return .request(request) + } catch { + return .unsuccessful(error: error) + } + } +} + +extension WCSignMessageHandler: IWalletConnectRequestViewFactory { + func viewController(request: WalletConnectRequest) -> WalletConnectRequestChain.ViewFactoryResult { + guard request.payload is WCSignMessagePayload else { + return .unsuccessful(error: WalletConnectRequestChain.ViewFactoryError.cantRecognizeHandler) + } + + let controller = Payload.module(request: request) + return .controller(controller) + } +} diff --git a/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Request/Handlers/Sign/WCSignMessagePayload.swift b/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Request/Handlers/Sign/WCSignMessagePayload.swift new file mode 100644 index 0000000000..75ecf45666 --- /dev/null +++ b/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Request/Handlers/Sign/WCSignMessagePayload.swift @@ -0,0 +1,64 @@ +import Foundation +import UIKit +import WalletConnectSign + +class WCSignMessagePayload: WCRequestPayload { + class var method: String { "" } + override var method: String { Self.method } + + override init(dAppName: String, data: Data) { + super.init(dAppName: dAppName, data: data) + } + + required public convenience init(dAppName: String, from anyCodable: AnyCodable) throws { + self.init(dAppName: dAppName, data: try Self.data(from: anyCodable)) + } + + class func data(from anyCodable: AnyCodable) throws -> Data { + throw ParsingError.badJSONRPCRequest + } + + class func module(request: WalletConnectRequest) -> UIViewController? { + WalletConnectSignMessageRequestModule.viewController(request: request) + } +} + +class WCSignPayload: WCSignMessagePayload { + override class var method: String { "eth_sign" } + + override class func data(from anyCodable: AnyCodable) throws -> Data { + let strings = try anyCodable.get([String].self) + if strings.count >= 2, let data = strings[1].hs.hexData { + return data + } + throw ParsingError.badJSONRPCRequest + } +} + +class WCPersonalSignPayload: WCSignMessagePayload { + override class var method: String { "personal_sign" } + + override class func data(from anyCodable: AnyCodable) throws -> Data { + let strings = try anyCodable.get([String].self) + if strings.count >= 1, let data = strings[0].hs.hexData ?? strings[0].data(using: .utf8) { + return data + } + throw ParsingError.badJSONRPCRequest + } +} + +class WCSignTypedDataPayload: WCSignMessagePayload { + override class var method: String { "eth_signTypedData" } + + override class func data(from anyCodable: AnyCodable) throws -> Data { + let strings = try anyCodable.get([String].self) + if strings.count >= 2, let data = strings[1].data(using: .utf8) { + return data + } + throw ParsingError.badJSONRPCRequest + } +} + +class WCSignTypedDataV4Payload: WCSignTypedDataPayload { + override class var method: String { "eth_signTypedData_v4" } +} diff --git a/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Request/Handlers/WCRequestPayload.swift b/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Request/Handlers/WCRequestPayload.swift new file mode 100644 index 0000000000..74a277ede1 --- /dev/null +++ b/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Request/Handlers/WCRequestPayload.swift @@ -0,0 +1,23 @@ +import Foundation +import WalletConnectSign + +class WCRequestPayload { + let dAppName: String + let data: Data + + init(dAppName: String, data: Data) { + self.dAppName = dAppName + self.data = data + } + + var method: String { + fatalError("Must be overridden by subclass") + } +} + +extension WCRequestPayload { + enum ParsingError: Error { + case cantParseRequest + case badJSONRPCRequest + } +} diff --git a/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Request/Handlers/Wallet/WCWalletHandler.swift b/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Request/Handlers/Wallet/WCWalletHandler.swift new file mode 100644 index 0000000000..e43e98aaa2 --- /dev/null +++ b/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Request/Handlers/Wallet/WCWalletHandler.swift @@ -0,0 +1,42 @@ +import Foundation + +import Foundation +import UIKit +import WalletConnectSign + +class WCWalletHandler: WalletConnectRequestHandler { + override var method: String { Payload.method } + let requestFactory: Eip155RequestFactory + + init(requestFactory: Eip155RequestFactory) { + self.requestFactory = requestFactory + } + + private func isValidated(chainId: Int) -> Bool { + requestFactory.evmBlockchainManager.blockchain(chainId: chainId) != nil + } + + private func respond(request: Request, successful: Bool) throws { + Task { + let response: RPCResult = successful ? .response(AnyCodable("null")) : .error(.init(code: 4902, message: "Unrecognized chain ID")) + try await Sign.instance.respond(topic: request.topic, requestId: request.id, response: response) + } + } +} + +extension WCWalletHandler: IWalletConnectRequestHandler { + func handle(session: Session, request: Request) -> WalletConnectRequestChain.RequestResult { + guard request.method == Payload.method else { + return .unsuccessful(error: WCRequestPayload.ParsingError.cantParseRequest) + } + + do { + let payload = try Payload(dAppName: session.peer.name, from: request.params) + try respond(request: request, successful: isValidated(chainId: payload.chainId)) + + return .handled + } catch { + return .unsuccessful(error: error) + } + } +} diff --git a/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Request/Handlers/Wallet/WCWalletPayload.swift b/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Request/Handlers/Wallet/WCWalletPayload.swift new file mode 100644 index 0000000000..fcad778083 --- /dev/null +++ b/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Request/Handlers/Wallet/WCWalletPayload.swift @@ -0,0 +1,32 @@ +import Foundation +import WalletConnectSign + +class WCWalletPayload: WCRequestPayload { + class var method: String { "" } + override var method: String { Self.method } + + let chainId: Int + + init(dAppName: String, chainId: Int, data: Data) { + self.chainId = chainId + super.init(dAppName: dAppName, data: data) + } + + required public convenience init(dAppName: String, from anyCodable: AnyCodable) throws { + let chain = try anyCodable.get([WalletConnectChain].self) + guard let chain = chain.first, + let chainId = Int(chain.chainId.replacingOccurrences(of: "0x", with: ""), radix: 16) else { + throw ParsingError.badJSONRPCRequest + } + + self.init(dAppName: dAppName, chainId: chainId, data: chain.encoded) + } +} + +class WCWalletAddChainPayload: WCWalletPayload { + override class var method: String { "wallet_addEthereumChain" } +} + +class WCSwitchChainPayload: WCWalletPayload { + override class var method: String { "wallet_switchEthereumChain" } +} diff --git a/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Request/Handlers/Wallet/WalletConnectChain.swift b/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Request/Handlers/Wallet/WalletConnectChain.swift new file mode 100644 index 0000000000..28c6833fba --- /dev/null +++ b/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Request/Handlers/Wallet/WalletConnectChain.swift @@ -0,0 +1,16 @@ +import Foundation + +struct WalletConnectChain: Codable { + let chainId: String + let chainName: String? + let rpcUrls: [String]? + let iconUrls: [String]? + let nativeCurrency: WalletConnectNativeCurrency? + let blockExplorerUrls: [String]? +} + +struct WalletConnectNativeCurrency: Codable { + let name: String + let symbol: String + let decimals: Int +} \ No newline at end of file diff --git a/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Request/Handlers/WalletConnectRequestChain.swift b/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Request/Handlers/WalletConnectRequestChain.swift new file mode 100644 index 0000000000..878bf2b233 --- /dev/null +++ b/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Request/Handlers/WalletConnectRequestChain.swift @@ -0,0 +1,118 @@ +import Foundation +import WalletConnectSign +import UIKit + +protocol IWalletConnectRequestHandler { + func handle(session: Session, request: Request) -> WalletConnectRequestChain.RequestResult + var supportedMethods: [String] { get } +} + +protocol IWalletConnectRequestViewFactory { + func viewController(request: WalletConnectRequest) -> WalletConnectRequestChain.ViewFactoryResult +} + +class WalletConnectRequestChain { + private var handlers = [IWalletConnectRequestHandler]() + + func append(handler: IWalletConnectRequestHandler) { + handlers.append(handler) + } +} + +extension WalletConnectRequestChain: IWalletConnectRequestHandler { + func handle(session: Session, request: Request) -> WalletConnectRequestChain.RequestResult { + var lastError: Error? + for handler in handlers { + let result = handler.handle(session: session, request: request) + if result.successful { + return result + } else { + lastError = result.error + } + } + + return .unsuccessful(error: lastError) + } + + var supportedMethods: [String] { handlers.reduce(into: []) { $0.append(contentsOf: $1.supportedMethods) } } +} + +extension WalletConnectRequestChain: IWalletConnectRequestViewFactory { + func viewController(request: WalletConnectRequest) -> WalletConnectRequestChain.ViewFactoryResult { + for handler in handlers { + guard let handler = handler as? IWalletConnectRequestViewFactory else { + continue + } + let result = handler.viewController(request: request) + switch result { + case .unsuccessful: continue + case .controller: return result + } + } + + return .unsuccessful(error: ViewFactoryError.cantRecognizeHandler) + } +} + +extension WalletConnectRequestChain { + enum RequestResult { + case unsuccessful(error: Error?) + case handled + case request(WalletConnectRequest) + + var successful: Bool { + switch self { + case .unsuccessful: return false + case .handled, .request: return true + } + } + + var error: Error? { + switch self { + case .unsuccessful(let error): return error + case .handled, .request: return nil + } + } + } + + enum ViewFactoryResult { + case unsuccessful(error: Error?) + case controller(UIViewController?) + } + + enum ViewFactoryError: Error { + case cantRecognizeHandler + } +} + +extension WalletConnectRequestChain { + static func instance(evmBlockchainManager: EvmBlockchainManager, accountManager: AccountManager) -> WalletConnectRequestChain { + let chain = WalletConnectRequestChain() + let factory = Eip155RequestFactory( + evmBlockchainManager: evmBlockchainManager, + accountManager: accountManager + ) + + let signHandler = WCSignMessageHandler(requestFactory: factory) + let personalSignHandler = WCSignMessageHandler(requestFactory: factory) + let signTypedDataHandler = WCSignMessageHandler(requestFactory: factory) + let signTypedDataV4Handler = WCSignMessageHandler(requestFactory: factory) + + let sendEthereumHandler = WCEthereumTransactionHandler(requestFactory: factory) +// let signEthereumHandler = WCEthereumTransactionHandler(requestFactory: factory) + + let addChainHandler = WCWalletHandler(requestFactory: factory) + let switchChainHandler = WCWalletHandler(requestFactory: factory) + + chain.append(handler: signHandler) + chain.append(handler: personalSignHandler) + chain.append(handler: signTypedDataHandler) + chain.append(handler: signTypedDataV4Handler) + chain.append(handler: sendEthereumHandler) +// chain.append(handler: signEthereumHandler) + chain.append(handler: addChainHandler) + chain.append(handler: switchChainHandler) + + return chain + } +} diff --git a/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Request/Handlers/WalletConnectRequestHandler.swift b/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Request/Handlers/WalletConnectRequestHandler.swift new file mode 100644 index 0000000000..70a979d2b2 --- /dev/null +++ b/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Request/Handlers/WalletConnectRequestHandler.swift @@ -0,0 +1,6 @@ +import Foundation + +class WalletConnectRequestHandler { + var method: String { fatalError("Must be implemented by subclass") } + var supportedMethods: [String] { [method] } +} diff --git a/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Request/SendEthereumTransaction/WalletConnectSendEthereumTransactionRequestModule.swift b/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Request/SendEthereumTransaction/WalletConnectSendEthereumTransactionRequestModule.swift index c0a1358c41..da6444b1d3 100644 --- a/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Request/SendEthereumTransaction/WalletConnectSendEthereumTransactionRequestModule.swift +++ b/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Request/SendEthereumTransaction/WalletConnectSendEthereumTransactionRequestModule.swift @@ -1,32 +1,36 @@ -import UIKit import EvmKit import MarketKit +import UIKit struct WalletConnectSendEthereumTransactionRequestModule { - - static func viewController(signService: IWalletConnectSignService, request: WalletConnectSendEthereumTransactionRequest) -> UIViewController? { - guard let account = App.shared.accountManager.activeAccount, - let evmKitWrapper = App.shared.walletConnectManager.evmKitWrapper(chainId: request.chain.id, account: account) else { + static func viewController(request: WalletConnectRequest) -> UIViewController? { + guard let payload = request.payload as? WCSendEthereumTransactionPayload, + let account = App.shared.accountManager.activeAccount, + let evmKitWrapper = App.shared.walletConnectManager.evmKitWrapper(chainId: request.chain.id, account: account) + else { return nil } guard let coinServiceFactory = EvmCoinServiceFactory( - blockchainType: evmKitWrapper.blockchainType, - marketKit: App.shared.marketKit, - currencyManager: App.shared.currencyManager, - coinManager: App.shared.coinManager + blockchainType: evmKitWrapper.blockchainType, + marketKit: App.shared.marketKit, + currencyManager: App.shared.currencyManager, + coinManager: App.shared.coinManager ) else { return nil } - let service = WalletConnectSendEthereumTransactionRequestService(request: request, baseService: signService) - let info = SendEvmData.DAppInfo(name: request.dAppName, chainName: request.chain.chainName, address: request.chain.address) + let signService = App.shared.walletConnectSessionManager.service + guard let service = WalletConnectSendEthereumTransactionRequestService(request: request, baseService: signService) else { + return nil + } + let info = SendEvmData.DAppInfo(name: request.payload.dAppName, chainName: request.chain.chainName, address: request.chain.address) let additionalInfo: SendEvmData.AdditionInfo = .otherDApp(info: info) let sendEvmData = SendEvmData(transactionData: service.transactionData, additionalInfo: additionalInfo, warnings: []) guard let (settingsService, settingsViewModel) = EvmSendSettingsModule.instance( - evmKit: evmKitWrapper.evmKit, blockchainType: evmKitWrapper.blockchainType, sendData: sendEvmData, coinServiceFactory: coinServiceFactory, - gasPrice: service.gasPrice, predefinedGasLimit: request.transaction.gasLimit + evmKit: evmKitWrapper.evmKit, blockchainType: evmKitWrapper.blockchainType, sendData: sendEvmData, coinServiceFactory: coinServiceFactory, + gasPrice: service.gasPrice, predefinedGasLimit: payload.transaction.gasLimit ) else { return nil } @@ -38,5 +42,4 @@ struct WalletConnectSendEthereumTransactionRequestModule { return WalletConnectRequestViewController(viewModel: viewModel, transactionViewModel: transactionViewModel, settingsViewModel: settingsViewModel) } - } diff --git a/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Request/SendEthereumTransaction/WalletConnectSendEthereumTransactionRequestService.swift b/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Request/SendEthereumTransaction/WalletConnectSendEthereumTransactionRequestService.swift index 9fa6173123..fb8f3caa60 100644 --- a/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Request/SendEthereumTransaction/WalletConnectSendEthereumTransactionRequestService.swift +++ b/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Request/SendEthereumTransaction/WalletConnectSendEthereumTransactionRequestService.swift @@ -2,10 +2,15 @@ import Foundation import EvmKit class WalletConnectSendEthereumTransactionRequestService { - private let request: WalletConnectSendEthereumTransactionRequest + private let request: WalletConnectRequest + private let payload: WCSendEthereumTransactionPayload private let signService: IWalletConnectSignService - init(request: WalletConnectSendEthereumTransactionRequest, baseService: IWalletConnectSignService) { + init?(request: WalletConnectRequest, baseService: IWalletConnectSignService) { + guard let payload = request.payload as? WCSendEthereumTransactionPayload else { + return nil + } + self.payload = payload self.request = request signService = baseService } @@ -16,19 +21,19 @@ extension WalletConnectSendEthereumTransactionRequestService { var transactionData: TransactionData { TransactionData( - to: request.transaction.to, - value: request.transaction.value, - input: request.transaction.data + to: payload.transaction.to, + value: payload.transaction.value, + input: payload.transaction.data ) } var gasPrice: GasPrice? { - if let maxFeePerGas = request.transaction.maxFeePerGas, - let maxPriorityFeePerGas = request.transaction.maxPriorityFeePerGas { + if let maxFeePerGas = payload.transaction.maxFeePerGas, + let maxPriorityFeePerGas = payload.transaction.maxPriorityFeePerGas { return GasPrice.eip1559(maxFeePerGas: maxFeePerGas, maxPriorityFeePerGas: maxPriorityFeePerGas) } - return request.transaction.gasPrice.flatMap { GasPrice.legacy(gasPrice: $0) } + return payload.transaction.gasPrice.flatMap { GasPrice.legacy(gasPrice: $0) } } func approve(transactionHash: Data) { diff --git a/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Request/Sign/WalletConnectSignMessageRequestModule.swift b/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Request/Sign/WalletConnectSignMessageRequestModule.swift index 7a1d63e2d6..cfbcfb3b29 100644 --- a/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Request/Sign/WalletConnectSignMessageRequestModule.swift +++ b/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Request/Sign/WalletConnectSignMessageRequestModule.swift @@ -1,19 +1,19 @@ -import UIKit import EvmKit +import UIKit struct WalletConnectSignMessageRequestModule { - - static func viewController(signService: IWalletConnectSignService, request: WalletConnectSignMessageRequest) -> UIViewController? { + static func viewController(request: WalletConnectRequest) -> UIViewController? { guard let account = App.shared.accountManager.activeAccount, let evmWrapper = App.shared.walletConnectManager.evmKitWrapper(chainId: request.chain.id, account: account), - let signer = evmWrapper.signer else { + let signer = evmWrapper.signer + else { return nil } + let signService = App.shared.walletConnectSessionManager.service let service = WalletConnectSignMessageRequestService(request: request, signService: signService, signer: signer) let viewModel = WalletConnectSignMessageRequestViewModel(service: service) return WalletConnectSignMessageRequestViewController(viewModel: viewModel) } - } diff --git a/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Request/Sign/WalletConnectSignMessageRequestService.swift b/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Request/Sign/WalletConnectSignMessageRequestService.swift index e5af88d35b..a43f01d9be 100644 --- a/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Request/Sign/WalletConnectSignMessageRequestService.swift +++ b/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Request/Sign/WalletConnectSignMessageRequestService.swift @@ -1,12 +1,12 @@ -import Foundation import EvmKit +import Foundation class WalletConnectSignMessageRequestService { - private let request: WalletConnectSignMessageRequest + private let request: WalletConnectRequest private let signService: IWalletConnectSignService private let signer: Signer - init(request: WalletConnectSignMessageRequest, signService: IWalletConnectSignService, signer: Signer) { + init(request: WalletConnectRequest, signService: IWalletConnectSignService, signer: Signer) { self.request = request self.signService = signService self.signer = signer @@ -15,20 +15,18 @@ class WalletConnectSignMessageRequestService { private func sign(message: Data, isLegacy: Bool = false) throws -> Data { try signer.signed(message: message, isLegacy: isLegacy) } - } extension WalletConnectSignMessageRequestService { - var message: String { switch request.payload { - case let .sign(data, _): - return String(data: data, encoding: .utf8) ?? data.hs.hexString - case let .personalSign(data, _): - return String(data: data, encoding: .utf8) ?? data.hs.hexString - case let .signTypeData(_, data, _): + case let payload as WCSignPayload: + return String(data: payload.data, encoding: .utf8) ?? payload.data.hs.hexString + case let payload as WCPersonalSignPayload: + return String(data: payload.data, encoding: .utf8) ?? payload.data.hs.hexString + case let payload as WCSignTypedDataPayload: do { - let eip712TypedData = try EIP712TypedData.parseFrom(rawJson: data) + let eip712TypedData = try EIP712TypedData.parseFrom(rawJson: payload.data) let encoder = JSONEncoder() encoder.outputFormatting = [.prettyPrinted, .sortedKeys] let data = try encoder.encode(eip712TypedData.sanitizedMessage) @@ -37,13 +35,14 @@ extension WalletConnectSignMessageRequestService { } catch { return "" } + default: return "" } } var domain: String? { switch request.payload { - case .signTypeData(_, let data, _): - if let eip712TypedData = try? EIP712TypedData.parseFrom(rawJson: data), let domain = eip712TypedData.domain.objectValue, let domainString = domain["name"]?.stringValue { + case let payload as WCSignTypedDataPayload: + if let eip712TypedData = try? EIP712TypedData.parseFrom(rawJson: payload.data), let domain = eip712TypedData.domain.objectValue, let domainString = domain["name"]?.stringValue { return domainString } default: () @@ -53,7 +52,7 @@ extension WalletConnectSignMessageRequestService { } var dAppName: String? { - request.dAppName + request.payload.dAppName } var chain: WalletConnectRequest.Chain { @@ -64,14 +63,15 @@ extension WalletConnectSignMessageRequestService { let signedMessage: Data switch request.payload { - case let .sign(data, _): // legacy sync use already prefixed data hashed by Kessak-256 with length 32 bytes - let isLegacy = data.count == 32 && (String(data: data, encoding: .utf8) != nil) - signedMessage = try sign(message: data, isLegacy: isLegacy) - case let .personalSign(data, _): - signedMessage = try sign(message: data) - case let .signTypeData(_, data, _): - let eip712TypedData = try EIP712TypedData.parseFrom(rawJson: data) + case let payload as WCSignPayload: // legacy sync use already prefixed data hashed by Kessak-256 with length 32 bytes + let isLegacy = payload.data.count == 32 && (String(data: payload.data, encoding: .utf8) != nil) + signedMessage = try sign(message: payload.data, isLegacy: isLegacy) + case let payload as WCPersonalSignPayload: + signedMessage = try sign(message: payload.data) + case let payload as WCSignTypedDataPayload: + let eip712TypedData = try EIP712TypedData.parseFrom(rawJson: payload.data) signedMessage = try signer.sign(eip712TypedData: eip712TypedData) + default: signedMessage = Data() } signService.approveRequest(id: request.id, result: signedMessage) @@ -80,5 +80,4 @@ extension WalletConnectSignMessageRequestService { func reject() { signService.rejectRequest(id: request.id) } - } diff --git a/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Request/WalletConnectRequestMapper.swift b/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Request/WalletConnectRequestMapper.swift deleted file mode 100644 index 8a5db0ba06..0000000000 --- a/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Request/WalletConnectRequestMapper.swift +++ /dev/null @@ -1,67 +0,0 @@ -import Foundation -import WalletConnectSign -import WalletConnectV1 -import HsExtensions - -struct WalletConnectRequestMapper { - - static func map(dAppName: String?, chain: WalletConnectRequest.Chain, request: WalletConnectSign.Request) throws -> WalletConnectRequest? { - let id = request.id.intValue - switch request.method { - case "eth_sign": - guard let params = try? request.params.get([String].self), - params.count == 2, - let data = params[1].hs.hexData else { - return nil - } - return WalletConnectSignMessageRequest( - id: id, - chain: chain, - dAppName: dAppName, - payload: WCEthereumSignPayload.sign(data: data, raw: params) - ) - - case "personal_sign": - guard let params = try? request.params.get([String].self), - let dataString = params.first, - let data = dataString.hs.hexData ?? dataString.data(using: .utf8) else { - return nil - } - return WalletConnectSignMessageRequest( - id: id, - chain: chain, - dAppName: dAppName, - payload: WCEthereumSignPayload.personalSign(data: data, raw: params) - ) - - case "eth_signTypedData": - guard let params = try? request.params.get([String].self), - params.count >= 2, - let data = params[1].data(using: .utf8) else { - return nil - } - return WalletConnectSignMessageRequest( - id: id, - chain: chain, - dAppName: dAppName, - payload: WCEthereumSignPayload.signTypeData(id: request.id.int64Value, data: data, raw: params) - ) - - case "eth_sendTransaction": - guard let transactions = try? request.params.get([WCEthereumTransaction].self), - !transactions.isEmpty else { - return nil - } - return try WalletConnectSendEthereumTransactionRequest( - id: id, - chain: chain, - dAppName: dAppName, - transaction: transactions[0] - ) - - default: - return nil - } - } - -} diff --git a/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Request/WalletConnectRequestModule.swift b/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Request/WalletConnectRequestModule.swift deleted file mode 100644 index 6d9dc00871..0000000000 --- a/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/Request/WalletConnectRequestModule.swift +++ /dev/null @@ -1,33 +0,0 @@ -import RxCocoa -import EvmKit -import BigInt -import UIKit - -struct WalletConnectTransaction { - let from: EvmKit.Address - let to: EvmKit.Address - let nonce: Int? - let gasPrice: Int? - let gasLimit: Int? - let maxPriorityFeePerGas: Int? - let maxFeePerGas: Int? - let type: Int? - let value: BigUInt - let data: Data -} - -struct WalletConnectRequestModule { - - static func viewController(signService: IWalletConnectSignService, request: WalletConnectRequest) -> UIViewController? { - switch request { - case let request as WalletConnectSignMessageRequest: - let service = App.shared.walletConnectSessionManager.service - return WalletConnectSignMessageRequestModule.viewController(signService: service, request: request) - case let request as WalletConnectSendEthereumTransactionRequest: - let service = App.shared.walletConnectSessionManager.service - return WalletConnectSendEthereumTransactionRequestModule.viewController(signService: service, request: request) - default: return nil - } - } - -} \ No newline at end of file diff --git a/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/SessionRequestFilterManager.swift b/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/SessionRequestFilterManager.swift deleted file mode 100644 index f177a97a82..0000000000 --- a/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/SessionRequestFilterManager.swift +++ /dev/null @@ -1,32 +0,0 @@ -import Foundation -import WalletConnectSign - -class SessionRequestFilterManager { - private let rejectList = [ - // 1Inch custom methods - "personal_ecRecover", - "eth_getCode", - "wallet_switchEthereumChain", - "wallet_addEthereumChain" - ] - - private func reject(request: Request) { - Task { - do { - try await Sign.instance.respond(topic: request.topic, requestId: request.id, response: .error(.init(code: 5000, message: "Reject by User"))) - } catch { - print(error) - } - } - - } - - func handle(request: Request) -> Bool { - if rejectList.contains(request.method) { - reject(request: request) - return true - } - return false - } - -} diff --git a/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/WalletConnectInteractor.swift b/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/WalletConnectInteractor.swift deleted file mode 100644 index b9dee7629c..0000000000 --- a/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/WalletConnectInteractor.swift +++ /dev/null @@ -1,159 +0,0 @@ -import Foundation -import UIKit -import WalletConnectV1 - -protocol IWalletConnectInteractorDelegate: AnyObject { - func didUpdate(state: WalletConnectInteractor.State) - func didRequestSession(peerId: String, peerMeta: WCPeerMeta, chainId: Int?) - func didKillSession() - func didRequestSendEthereumTransaction(id: Int, transaction: WCEthereumTransaction) - func didRequestSignEthereumTransaction(id: Int, transaction: WCEthereumTransaction) - func didRequestSign(id: Int, payload: WCEthereumSignPayload) - func didReceive(error: Error) -} - -extension IWalletConnectInteractorDelegate { - - func didRequestSession(peerId: String, peerMeta: WalletConnectV1.WCPeerMeta, chainId: Int?) {} - func didKillSession() {} - func didRequestSendEthereumTransaction(id: Int, transaction: WalletConnectV1.WCEthereumTransaction) {} - func didRequestSignEthereumTransaction(id: Int, transaction: WalletConnectV1.WCEthereumTransaction) {} - func didRequestSign(id: Int, payload: WalletConnectV1.WCEthereumSignPayload) {} - func didReceive(error: Error) {} - -} - -class WalletConnectInteractor { - private static let clientMeta = WCPeerMeta(name: AppConfig.appName, url: AppConfig.appWebPageLink) - - weak var delegate: IWalletConnectInteractorDelegate? - - private let interactor: WCInteractor - - private(set) var state: State = .disconnected { - didSet { - delegate?.didUpdate(state: state) - } - } - - init(session: WCSession, remotePeerId: String? = nil) { - interactor = WCInteractor(session: session, meta: Self.clientMeta, uuid: UIDevice.current.identifierForVendor ?? UUID(), peerId: remotePeerId) - - interactor.onSessionRequest = { [weak self] (id, requestParam) in - self?.delegate?.didRequestSession(peerId: requestParam.peerId, peerMeta: requestParam.peerMeta, chainId: requestParam.chainId) - } - - interactor.onSessionKill = { [weak self] in - self?.delegate?.didKillSession() - } - - interactor.onError = { [weak self] error in - self?.onError(error: error) - } - - interactor.onDisconnect = { [weak self] error in - self?.state = .disconnected - } - - interactor.eth.onTransaction = { [weak self] id, event, transaction in - switch event { - case .ethSendTransaction: - self?.delegate?.didRequestSendEthereumTransaction(id: Int(id), transaction: transaction) - case .ethSignTransaction: - self?.delegate?.didRequestSignEthereumTransaction(id: Int(id), transaction: transaction) - default: - self?.rejectWithNotSupported(id: id) - } - } - - interactor.eth.onSign = { [weak self] id, payload in - self?.delegate?.didRequestSign(id: Int(id), payload: payload) - } - - interactor.bnb.onSign = { [weak self] id, _ in - self?.rejectWithNotSupported(id: id) - } - - interactor.trust.onTransactionSign = { [weak self] id, _ in - self?.rejectWithNotSupported(id: id) - } - - interactor.trust.onGetAccounts = { [weak self] id in - self?.rejectWithNotSupported(id: id) - } - } - - convenience init(uri: String) throws { - guard let session = WCSession.from(string: uri) else { - throw SessionError.invalidUri - } - - self.init(session: session) - } - - private func onError(error: Error) { - delegate?.didReceive(error: error) - } - - private func rejectWithNotSupported(id: Int64) { - interactor.rejectRequest(id: id, message: "Not supported yet").cauterize() - } - -} - -extension WalletConnectInteractor { - - var session: WCSession { - interactor.session - } - - func connect() { - state = .connecting - - interactor.connect().done { [weak self] connected in - self?.state = .connected - }.catch { [weak self] error in - print("Connect Error: \(error)") - self?.state = .disconnected - } - } - - func approveSession(address: String, chainId: Int) { - interactor.approveSession(accounts: [address], chainId: chainId).cauterize() - } - - func rejectSession(message: String) { - interactor.rejectSession(message).cauterize() - } - - func killSession() { - interactor.killSession().cauterize() - } - - func approveRequest(id: Int, result: T) { - interactor.approveRequest(id: Int64(id), result: result).cauterize() - } - - func rejectRequest(id: Int, message: String) { - interactor.rejectRequest(id: Int64(id), message: message).cauterize() - } - -} - -extension WalletConnectInteractor { - - public enum State { - case connected - case connecting - case disconnected - } - - enum SessionError: LocalizedError { - case invalidUri - - var errorDescription: String? { - "wallet_connect.error.invalid_url".localized - } - } - -} diff --git a/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/WalletConnectRequest.swift b/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/WalletConnectRequest.swift index c1090890fe..8cd5a67cf0 100644 --- a/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/WalletConnectRequest.swift +++ b/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/WalletConnectRequest.swift @@ -1,20 +1,20 @@ -import Foundation import EvmKit -import WalletConnectV1 +import Foundation + import BigInt class WalletConnectRequest { let id: Int let chain: Chain - let dAppName: String? + let payload: WCRequestPayload - init(id: Int, chain: Chain, dAppName: String?) { + init(id: Int, chain: Chain, payload: WCRequestPayload) { self.id = id self.chain = chain - self.dAppName = dAppName + self.payload = payload } - func convert(result: Any) -> String? { + func convert(result _: Any) -> String? { nil } @@ -28,56 +28,13 @@ class WalletConnectRequest { self.chainName = chainName self.address = address } - - } - -} - -class WalletConnectSendEthereumTransactionRequest: WalletConnectRequest { - let transaction: WalletConnectTransaction - - init(id: Int, chain: WalletConnectRequest.Chain, dAppName: String?, transaction: WCEthereumTransaction) throws { - guard let to = transaction.to else { - throw TransactionError.noRecipient - } - - self.transaction = WalletConnectTransaction( - from: try EvmKit.Address(hex: transaction.from), - to: try EvmKit.Address(hex: to), - nonce: transaction.nonce.flatMap { Int($0.replacingOccurrences(of: "0x", with: ""), radix: 16) }, - gasPrice: transaction.gasPrice.flatMap { Int($0.replacingOccurrences(of: "0x", with: ""), radix: 16) }, - gasLimit: (transaction.gas ?? transaction.gasLimit).flatMap { Int($0.replacingOccurrences(of: "0x", with: ""), radix: 16) }, - maxPriorityFeePerGas: transaction.maxPriorityFeePerGas.flatMap { Int($0.replacingOccurrences(of: "0x", with: ""), radix: 16) }, - maxFeePerGas: transaction.maxFeePerGas.flatMap { Int($0.replacingOccurrences(of: "0x", with: ""), radix: 16) }, - type: transaction.type.flatMap { Int($0.replacingOccurrences(of: "0x", with: ""), radix: 16) }, - value: transaction.value.flatMap { BigUInt($0.replacingOccurrences(of: "0x", with: ""), radix: 16) } ?? 0, - data: Data(hex: transaction.data) - ) - - super.init(id: id, chain: chain, dAppName: dAppName) - } - - override func convert(result: Any) -> String? { - (result as? Data)?.hs.hexString } - - enum TransactionError: Error { - case noRecipient - } - } -class WalletConnectSignMessageRequest: WalletConnectRequest { - let payload: WCEthereumSignPayload - - init(id: Int, chain: WalletConnectRequest.Chain, dAppName: String?, payload: WCEthereumSignPayload) { - self.payload = payload - - super.init(id: id, chain: chain, dAppName: dAppName) +extension WalletConnectRequest { + enum CreationError: Error { + case noActiveAccount + case invalidChain + case cantCreateAddress } - - override func convert(result: Any) -> String? { - (result as? Data)?.hs.hexString - } - } diff --git a/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/WalletConnectService.swift b/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/WalletConnectService.swift index 74caa6028e..524477c36b 100644 --- a/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/WalletConnectService.swift +++ b/UnstoppableWallet/UnstoppableWallet/Modules/WalletConnect/WalletConnectService.swift @@ -23,7 +23,6 @@ struct SocketFactory: WebSocketFactory { class WalletConnectService { private let logger: Logger? private let connectionService: WalletConnectSocketConnectionService - private let sessionRequestFilterManager: SessionRequestFilterManager private let receiveProposalSubject = PublishSubject() private let receiveSessionRelay = PublishRelay() @@ -43,9 +42,8 @@ class WalletConnectService { private var publishers = [AnyCancellable]() - init(connectionService: WalletConnectSocketConnectionService, sessionRequestFilterManager: SessionRequestFilterManager, info: WalletConnectClientInfo, logger: Logger? = nil) { + init(connectionService: WalletConnectSocketConnectionService, info: WalletConnectClientInfo, logger: Logger? = nil) { self.connectionService = connectionService - self.sessionRequestFilterManager = sessionRequestFilterManager self.logger = logger let metadata = WalletConnectSign.AppMetadata( name: info.name, @@ -123,10 +121,6 @@ extension WalletConnectService { public func didReceive(sessionRequest: Request) { logger?.debug("WC v2 SignClient did receive session request: \(sessionRequest.method) : session: \(sessionRequest.topic)") - if sessionRequestFilterManager.handle(request: sessionRequest) { - return - } - sessionRequestReceivedRelay.accept(sessionRequest) pendingRequestsUpdatedRelay.accept(()) }