From 3ac571ebdf869785d38c0c40440529b11c9a5e9f Mon Sep 17 00:00:00 2001 From: Denis Lebedko Date: Thu, 17 Aug 2023 11:06:14 +0700 Subject: [PATCH 1/5] install sdk, add CIKeys --- Podfile | 3 + Podfile.lock | 47 ++++- fearless.xcodeproj/project.pbxproj | 196 +++++++++--------- .../Services/SoraCardInitializer.swift | 97 +++++++++ fearless/CIKeys.stencil | 17 ++ 5 files changed, 263 insertions(+), 97 deletions(-) create mode 100644 fearless/ApplicationLayer/Services/SoraCardInitializer.swift diff --git a/Podfile b/Podfile index 143ae28b1c..0016310310 100644 --- a/Podfile +++ b/Podfile @@ -26,6 +26,9 @@ abstract_target 'fearlessAll' do pod 'keccak.c' pod 'Charts', '~> 4.1.0' pod 'XNetworking', :podspec => 'https://raw.githubusercontent.com/soramitsu/x-networking/0.0.37/AppCommonNetworking/XNetworking/XNetworking.podspec' + pod 'SoraUIKit', :git => 'https://github.com/soramitsu/ios-ui.git', :tag => '1.0.2' + pod 'IdensicMobileSDK', :http => 'https://github.com/PayWings/PayWingsOnboardingKycSDK-iOS-IdensicMobile/archive/v2.2.1.tar.gz' + pod 'SCard', :git => 'https://github.com/sora-xor/sora-card-ios', :branch => 'release/1.0.0' # :tag => '1.0.0' # :path => '../sora-card-ios' def pods_with_configurations if %r{^true$}i.match ENV['F_DEV'] diff --git a/Podfile.lock b/Podfile.lock index bf71e58cab..50bd665f94 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -23,6 +23,7 @@ PODS: - Cuckoo (1.10.3): - Cuckoo/Swift (= 1.10.3) - Cuckoo/Swift (1.10.3) + - eIDRTC (1.1.34) - FireMock (3.1) - GoogleAPIClientForREST/Core (1.2.1): - GTMSessionFetcher (>= 1.1.7) @@ -41,6 +42,7 @@ PODS: - GTMSessionFetcher/Core (3.1.1) - GTMSessionFetcher/Full (3.1.1): - GTMSessionFetcher/Core + - IdensicMobileSDK (1.25.0) - IrohaCrypto (0.10.0): - IrohaCrypto/BIP39 (= 0.10.0) - IrohaCrypto/blake2 (= 0.10.0) @@ -71,11 +73,21 @@ PODS: - IrohaCrypto/Common - keccak.c (0.1.3) - Kingfisher (7.7.0) + - PayWingsOAuthSDK (1.2.2) + - PayWingsOnboardingKYC (5.1.13): + - VideoID (= 7.1.31) - R.swift (6.1.0): - R.swift.Library (~> 5.3.0) - R.swift.Library (5.3.0) - ReachabilitySwift (5.0.0) - RobinHood (2.6.7) + - SCard (1.0.0): + - IdensicMobileSDK + - PayWingsOAuthSDK (= 1.2.2) + - PayWingsOnboardingKYC (= 5.1.13) + - R.swift (~> 6.1.0) + - SnapKit + - SoraUIKit (~> 1.0.1) - scrypt.c (0.1.1) - secp256k1.c (0.1.2) - SnapKit (5.0.1) @@ -130,6 +142,7 @@ PODS: - SoraUI/PinView (1.10.3): - SoraUI/Controls - SoraUI/Skrull (1.10.3) + - SoraUIKit (1.0.2) - Sourcery (1.9.2): - Sourcery/CLI-Only (= 1.9.2) - Sourcery/CLI-Only (1.9.2) @@ -235,6 +248,8 @@ PODS: - SwiftLint (0.52.2) - SwiftyBeaver (1.9.5) - TweetNacl (1.0.2) + - VideoID (7.1.31): + - eIDRTC (= 1.1.34) - XNetworking (0.0.37) - xxHash-Swift (1.0.13) @@ -243,16 +258,19 @@ DEPENDENCIES: - CommonWallet/Core - Cuckoo - FireMock + - "IdensicMobileSDK (from `{:http=>\"https://github.com/PayWings/PayWingsOnboardingKycSDK-iOS-IdensicMobile/archive/v2.2.1.tar.gz\"}`)" - IrohaCrypto - keccak.c - Kingfisher - R.swift (= 6.1.0) - ReachabilitySwift - RobinHood (~> 2.6.7) + - SCard (from `https://github.com/sora-xor/sora-card-ios`, branch `release/1.0.0`) - SnapKit (~> 5.0.0) - SoraFoundation (~> 1.0.0) - SoraKeystore (from `https://github.com/soramitsu/keystore-iOS.git`, tag `1.0.1`) - SoraUI (~> 1.10.3) + - SoraUIKit (from `https://github.com/soramitsu/ios-ui.git`, tag `1.0.2`) - Sourcery (~> 1.4) - SSFChainConnection - SSFChainRegistry @@ -284,6 +302,7 @@ SPEC REPOS: - CocoaLumberjack - CommonWallet - Cuckoo + - eIDRTC - FireMock - GoogleAPIClientForREST - GoogleSignIn @@ -292,6 +311,8 @@ SPEC REPOS: - IrohaCrypto - keccak.c - Kingfisher + - PayWingsOAuthSDK + - PayWingsOnboardingKYC - R.swift - R.swift.Library - ReachabilitySwift @@ -308,6 +329,7 @@ SPEC REPOS: - SwiftLint - SwiftyBeaver - TweetNacl + - VideoID - xxHash-Swift https://github.com/soramitsu/SSFSpecs.git: - SSFChainConnection @@ -327,9 +349,17 @@ SPEC REPOS: - SSFXCM EXTERNAL SOURCES: + IdensicMobileSDK: + :http: https://github.com/PayWings/PayWingsOnboardingKycSDK-iOS-IdensicMobile/archive/v2.2.1.tar.gz + SCard: + :branch: release/1.0.0 + :git: https://github.com/sora-xor/sora-card-ios SoraKeystore: :git: https://github.com/soramitsu/keystore-iOS.git :tag: 1.0.1 + SoraUIKit: + :git: https://github.com/soramitsu/ios-ui.git + :tag: 1.0.2 Starscream: :git: https://github.com/soramitsu/fearless-starscream.git :tag: 4.0.8 @@ -337,9 +367,17 @@ EXTERNAL SOURCES: :podspec: https://raw.githubusercontent.com/soramitsu/x-networking/0.0.37/AppCommonNetworking/XNetworking/XNetworking.podspec CHECKOUT OPTIONS: + IdensicMobileSDK: + :http: https://github.com/PayWings/PayWingsOnboardingKycSDK-iOS-IdensicMobile/archive/v2.2.1.tar.gz + SCard: + :commit: 311939bc40aff65371f9494cbd1a5a8c88e0bc49 + :git: https://github.com/sora-xor/sora-card-ios SoraKeystore: :git: https://github.com/soramitsu/keystore-iOS.git :tag: 1.0.1 + SoraUIKit: + :git: https://github.com/soramitsu/ios-ui.git + :tag: 1.0.2 Starscream: :git: https://github.com/soramitsu/fearless-starscream.git :tag: 4.0.8 @@ -351,24 +389,30 @@ SPEC CHECKSUMS: CocoaLumberjack: 78abfb691154e2a9df8ded4350d504ee19d90732 CommonWallet: 3c67d5fd85593a20f6b55777c2660ff886fc4148 Cuckoo: 930598bd4ae95860c658b3eea30903d946ebef36 + eIDRTC: debca63e4c367be509c77292df65b9527d695f10 FireMock: 3eed872059c12f94855413347da83b9d6d1a6fac GoogleAPIClientForREST: a8b95a252014ce2e618df6b75dc72eca2c00b4af GoogleSignIn: b232380cf495a429b8095d3178a8d5855b42e842 GTMAppAuth: 99fb010047ba3973b7026e45393f51f27ab965ae GTMSessionFetcher: e8647203b65cee28c5f73d0f473d096653945e72 + IdensicMobileSDK: 724b75dbb204a9c1ae1dafe5c1366b8aeb00b6cf IrohaCrypto: eb3772088068d8938198205b62b0a9dc5b8ce005 keccak.c: 859583afdaccb4e4fcc0f0096064d101580313f4 Kingfisher: f043ac666dfc96c1f37604f93effb45a7ee3a3e1 + PayWingsOAuthSDK: 97c104c6efa982313fd515c22339279f24ac3461 + PayWingsOnboardingKYC: abff20d772e9b87e9315b4999feb7401d6557eee R.swift: ec98ff71c4ab2f6fd01dd077e5afd15e63a4834c R.swift.Library: 0fc583cb55a99e28901299cc451614cad1161962 ReachabilitySwift: 985039c6f7b23a1da463388634119492ff86c825 RobinHood: 40edb5db53d5763433af25f95d81f7860d7acdc6 + SCard: 75b8f01b87f7a52e581e9c0ebb5d65fedbefddd0 scrypt.c: b42ae06183251329d2b2c620c226fb541a4a3592 secp256k1.c: db47b726585d80f027423682eb369729e61b3b20 SnapKit: 97b92857e3df3a0c71833cce143274bf6ef8e5eb SoraFoundation: 988d90ee3159311b02e42aeba0cf7e85d8bc724c SoraKeystore: e1789fe41412606d8a1116b86bd00d46d4cb9ccb SoraUI: 1ec71151eb962591eeb898bcdd98bded59745f2d + SoraUIKit: 258aa43f318cb306b29cdadb52139d794c184333 Sourcery: 179539341c2261068528cd15a31837b7238fd901 SSFChainConnection: a232b35cc083e9e9e79ff6ed228812cddd11ace6 SSFChainRegistry: bb26ac38e4c43aeaf29f1a959603aa5fd6889d7e @@ -392,9 +436,10 @@ SPEC CHECKSUMS: SwiftLint: 1ac76dac888ca05cb0cf24d0c85887ec1209961d SwiftyBeaver: 84069991dd5dca07d7069100985badaca7f0ce82 TweetNacl: 3abf4d1d2082b0114e7a67410e300892448951e6 + VideoID: d48d4f30f79f12229421a09e65692561960dc5b5 XNetworking: 516d982bd74ff208222381d27e07052a5d897aaf xxHash-Swift: 30bd6a7507b3b7348a277c49b1cb6346c2905ec7 -PODFILE CHECKSUM: 5b8590914b2dd1916d27ab986de50d4cb62f69f6 +PODFILE CHECKSUM: d4d9fa802da1a5ab081efd0a15bbef52930f4958 COCOAPODS: 1.11.3 diff --git a/fearless.xcodeproj/project.pbxproj b/fearless.xcodeproj/project.pbxproj index 23c00e653f..c71abd537a 100644 --- a/fearless.xcodeproj/project.pbxproj +++ b/fearless.xcodeproj/project.pbxproj @@ -16,6 +16,7 @@ 05A6BB4F8F0912404A4D8413 /* WalletTransactionDetailsPresenter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82FD4E0BB1ABA364AFD2E891 /* WalletTransactionDetailsPresenter.swift */; }; 06197BBE4299DC971C42DB92 /* WalletSendConfirmPresenter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8A687FBDA0912F8727CE0D81 /* WalletSendConfirmPresenter.swift */; }; 06590486EED4050BADDD32C5 /* AccountManagementPresenter.swift in Sources */ = {isa = PBXBuildFile; fileRef = F2B676982F60C55530BDD569 /* AccountManagementPresenter.swift */; }; + 0675CC47DB18F7EFE67DA611 /* Pods_fearlessTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 53B6268E4FFFCBBABA8FB21A /* Pods_fearlessTests.framework */; }; 0678271BE1BA5BBC084F478A /* RecommendedValidatorListWireframe.swift in Sources */ = {isa = PBXBuildFile; fileRef = 57C624E71FCE0FFF8EAD5BA9 /* RecommendedValidatorListWireframe.swift */; }; 0702B31529701759003519F5 /* AmountInputViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0702B31429701759003519F5 /* AmountInputViewModel.swift */; }; 0702B31829701864003519F5 /* WalletViewModelObserverContainer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0702B31729701864003519F5 /* WalletViewModelObserverContainer.swift */; }; @@ -230,7 +231,6 @@ 1BC06B323C5E5DE1B5A62CB4 /* PolkaswapTransaktionSettingsInteractor.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD730FFB75B5D76EA939042D /* PolkaswapTransaktionSettingsInteractor.swift */; }; 1BEADE77C6236CB3BF719A47 /* CrowdloanContributionSetupViewFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C96E41F878ED0A0A6F469D3 /* CrowdloanContributionSetupViewFactory.swift */; }; 1BFC90E1D8646F7429FFD5E6 /* ExportMnemonicProtocols.swift in Sources */ = {isa = PBXBuildFile; fileRef = EF3AD755B2B3DCFB3D14DF91 /* ExportMnemonicProtocols.swift */; }; - 1CB4787BD6681E80B72AB102 /* Pods_fearlessTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2060CFD77C64FD551E67508F /* Pods_fearlessTests.framework */; }; 1CBFE5F285223EA5D5300C49 /* WalletMainContainerProtocols.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8312AF0B70350EE27DB5B4A /* WalletMainContainerProtocols.swift */; }; 1DE31955634007BAC3B63158 /* ChainAccountTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AEA7ECB8434DF494D2B25B9 /* ChainAccountTests.swift */; }; 1E766A1656C2117F3F64769A /* NetworkManagementTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5FFEB823BE0057CFB78CC033 /* NetworkManagementTests.swift */; }; @@ -241,7 +241,6 @@ 1F88F3DBFA0BD6D0FDF558F3 /* SelectValidatorsConfirmViewFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = 975DECE71DE70DFD866B8E23 /* SelectValidatorsConfirmViewFactory.swift */; }; 20B2942A4241F6713A1C70D9 /* StakingRewardDetailsViewFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2377F8FB07B47637346249F5 /* StakingRewardDetailsViewFactory.swift */; }; 21322B4A297840739C389F17 /* AccountManagementInteractor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3558BD7D1B8CA1409BE74879 /* AccountManagementInteractor.swift */; }; - 215DB62F06780ED5176E5743 /* Pods_fearlessAll_fearless.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 789C9DF406149A067E6A6262 /* Pods_fearlessAll_fearless.framework */; }; 22B4A2BC93406867653AB93C /* WalletScanQRWireframe.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3088D75C6898029A3360B180 /* WalletScanQRWireframe.swift */; }; 23398AEC756086FEEEE91E65 /* WalletsManagmentRouter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B55A4C7E8BD87A7C8634ADD /* WalletsManagmentRouter.swift */; }; 237AD34CD1C2778834D7B330 /* AnalyticsValidatorsViewFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6F8BBBA9EABA266B288333F /* AnalyticsValidatorsViewFactory.swift */; }; @@ -300,7 +299,6 @@ 36139329003D9269E8D5C11C /* StakingMainTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5E11C7AF9A8DEC07246D5626 /* StakingMainTests.swift */; }; 3761C36C5BAFFB1518CD93A0 /* FiltersProtocols.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA8C34B051607218638BA851 /* FiltersProtocols.swift */; }; 37AE170856990F9FBEF052FC /* AllDoneAssembly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 262F98DEF54FA9592BE22B94 /* AllDoneAssembly.swift */; }; - 37B691BD838989C4BB538FB5 /* Pods_fearlessAll_fearlessIntegrationTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D67A02F84D78AFE5E37356ED /* Pods_fearlessAll_fearlessIntegrationTests.framework */; }; 37E1E9782B9752BC50AF2476 /* YourValidatorListViewFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1BE8644A4F6DED808248A0FE /* YourValidatorListViewFactory.swift */; }; 383B67877C3817A7BB132EB5 /* BackupPasswordInteractor.swift in Sources */ = {isa = PBXBuildFile; fileRef = F11AD046104FEC5A782288B9 /* BackupPasswordInteractor.swift */; }; 38BFEDD4B9F31EF2532962BD /* NetworkIssuesNotificationAssembly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0DB89A1483E4601F427056B3 /* NetworkIssuesNotificationAssembly.swift */; }; @@ -442,6 +440,7 @@ 7BEEF481CD12F404AD746FB5 /* WalletChainAccountDashboardViewLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5408FF305E4A49A683BC43E0 /* WalletChainAccountDashboardViewLayout.swift */; }; 7C93FA82996A426E7B8CA06E /* AccountExportPasswordViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27D5AF2F7609ADE855308089 /* AccountExportPasswordViewController.swift */; }; 7CBE9FFAF8394786CA131D4D /* CustomValidatorListProtocols.swift in Sources */ = {isa = PBXBuildFile; fileRef = F28EDDF9277242505FDDECA1 /* CustomValidatorListProtocols.swift */; }; + 7D13EAF8A650DD2053DC3E16 /* Pods_fearlessAll_fearlessIntegrationTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3A67F1FD6E60AFA553FD890B /* Pods_fearlessAll_fearlessIntegrationTests.framework */; }; 7D281FEA78E2E5F44990C184 /* AccountImportPresenter.swift in Sources */ = {isa = PBXBuildFile; fileRef = EB8605FD90D8C3553A9897B4 /* AccountImportPresenter.swift */; }; 7DFB3D265846A31807E1A663 /* StakingPoolCreateConfirmRouter.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0EE58376751B23A9CEAEE1A /* StakingPoolCreateConfirmRouter.swift */; }; 7E1A03082260E0D31AD394CA /* StakingRewardDetailsProtocols.swift in Sources */ = {isa = PBXBuildFile; fileRef = CF891BE39D442C2D06DDF3BB /* StakingRewardDetailsProtocols.swift */; }; @@ -1630,6 +1629,7 @@ C600C4D728053DF500111316 /* UsernameSetupViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C600C4D628053DF500111316 /* UsernameSetupViewController.swift */; }; C600C4D928054A1B00111316 /* AccountCreateFlow.swift in Sources */ = {isa = PBXBuildFile; fileRef = C600C4D828054A1B00111316 /* AccountCreateFlow.swift */; }; C603E81128583C2A00007B72 /* StakingMainRelaychainStrategy.swift in Sources */ = {isa = PBXBuildFile; fileRef = C603E81028583C2A00007B72 /* StakingMainRelaychainStrategy.swift */; }; + C606D6CD2A8DD0E900D456D9 /* SoraCardInitializer.swift in Sources */ = {isa = PBXBuildFile; fileRef = C606D6CC2A8DD0E900D456D9 /* SoraCardInitializer.swift */; }; C615668129309D3900391BF3 /* QRService.swift in Sources */ = {isa = PBXBuildFile; fileRef = C615668029309D3900391BF3 /* QRService.swift */; }; C61566852930A07900391BF3 /* QRCreationOperation.swift in Sources */ = {isa = PBXBuildFile; fileRef = C61566842930A07900391BF3 /* QRCreationOperation.swift */; }; C6264C292799A56E00FCA0DB /* WalletDetailsTableCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6264C282799A56E00FCA0DB /* WalletDetailsTableCell.swift */; }; @@ -1949,6 +1949,7 @@ F4FDA0F826A57626003D753B /* EraCountdownOperationFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4FDA0F726A57626003D753B /* EraCountdownOperationFactory.swift */; }; F4FDA0FD26A57860003D753B /* EraCountdown.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4FDA0FC26A57860003D753B /* EraCountdown.swift */; }; F50D9C2CCA49D396E0D6EFDD /* WalletTransactionDetailsViewLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = D80247ADAAB061D1A10856B2 /* WalletTransactionDetailsViewLayout.swift */; }; + F6081801997433B8DB5E832C /* Pods_fearlessAll_fearless.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C385925D32737B808FA4DFD8 /* Pods_fearlessAll_fearless.framework */; }; F60FEEDEAD176636BDB55359 /* BannersTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9BD51B1F823EB28D7DB0C2D /* BannersTests.swift */; }; F65C473A8402844C27534F8C /* BackupCreatePasswordInteractor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 550B20335186E95CE18630BF /* BackupCreatePasswordInteractor.swift */; }; F6CD0ED1CF9A605222745BEC /* ContactsRouter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75B53E901B1475DE858A2C99 /* ContactsRouter.swift */; }; @@ -2912,7 +2913,6 @@ 1C4F91B45B326A35A771CDAC /* BackupRiskWarningsViewController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = BackupRiskWarningsViewController.swift; sourceTree = ""; }; 1C52C6CD7112BF0E1E3A98CE /* PurchaseWireframe.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PurchaseWireframe.swift; sourceTree = ""; }; 1CA950D301F6605D204E99F3 /* PolkaswapSwapConfirmationAssembly.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PolkaswapSwapConfirmationAssembly.swift; sourceTree = ""; }; - 1CBC3327A727BEC12CC51AE7 /* Pods-fearlessTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-fearlessTests.debug.xcconfig"; path = "Target Support Files/Pods-fearlessTests/Pods-fearlessTests.debug.xcconfig"; sourceTree = ""; }; 1CC566D6EACB81469B926611 /* ExportMnemonicConfirmInteractor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ExportMnemonicConfirmInteractor.swift; sourceTree = ""; }; 1D651E438F86F37CC07D6D3F /* StakingPoolCreateViewController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = StakingPoolCreateViewController.swift; sourceTree = ""; }; 1D738FE711DD760B47C0BA65 /* WalletMainContainerPresenter.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = WalletMainContainerPresenter.swift; sourceTree = ""; }; @@ -2920,7 +2920,6 @@ 1E5CB64B91B35804B3671456 /* ControllerAccountPresenter.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ControllerAccountPresenter.swift; sourceTree = ""; }; 1F3B726402D4DB25059EF156 /* AnalyticsValidatorsProtocols.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = AnalyticsValidatorsProtocols.swift; sourceTree = ""; }; 200C6B2C85846AED8CA9451A /* ExportMnemonicInteractor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ExportMnemonicInteractor.swift; sourceTree = ""; }; - 2060CFD77C64FD551E67508F /* Pods_fearlessTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_fearlessTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 21A199872F289F61BCF0C62D /* WalletsManagmentAssembly.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = WalletsManagmentAssembly.swift; sourceTree = ""; }; 2222D628B9EA092D1C6B1CAE /* ChainSelectionPresenter.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ChainSelectionPresenter.swift; sourceTree = ""; }; 22289DD3B70546794C4838CC /* WalletChainAccountDashboardTests.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = WalletChainAccountDashboardTests.swift; sourceTree = ""; }; @@ -2929,6 +2928,7 @@ 23A74BDB54D503FA2BFBEF35 /* StakingUnbondSetupProtocols.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = StakingUnbondSetupProtocols.swift; sourceTree = ""; }; 23BC71941B91D3E372CDB11C /* CrowdloanContributionSetupViewLayout.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = CrowdloanContributionSetupViewLayout.swift; sourceTree = ""; }; 23CF7E56EC624BDB60290387 /* CreateContactPresenter.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = CreateContactPresenter.swift; sourceTree = ""; }; + 25A667173FD5472A339D4951 /* Pods-fearlessAll-fearlessIntegrationTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-fearlessAll-fearlessIntegrationTests.debug.xcconfig"; path = "Target Support Files/Pods-fearlessAll-fearlessIntegrationTests/Pods-fearlessAll-fearlessIntegrationTests.debug.xcconfig"; sourceTree = ""; }; 25FF82C2FD912021A1F20876 /* PolkaswapAdjustmentViewLayout.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PolkaswapAdjustmentViewLayout.swift; sourceTree = ""; }; 262F98DEF54FA9592BE22B94 /* AllDoneAssembly.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = AllDoneAssembly.swift; sourceTree = ""; }; 2648EEF96694A7FEC94520E8 /* WalletHistoryFilterTests.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = WalletHistoryFilterTests.swift; sourceTree = ""; }; @@ -2953,8 +2953,8 @@ 2AD0A19425D3D3EC00312428 /* GitHubOperationFactory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GitHubOperationFactory.swift; sourceTree = ""; }; 2AEC13E6950006302AC51B96 /* WalletTransactionHistoryProtocols.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = WalletTransactionHistoryProtocols.swift; sourceTree = ""; }; 2B55A4C7E8BD87A7C8634ADD /* WalletsManagmentRouter.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = WalletsManagmentRouter.swift; sourceTree = ""; }; - 2B652657F26C50D936CDB0AA /* Pods-fearlessAll-fearless.dev.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-fearlessAll-fearless.dev.xcconfig"; path = "Target Support Files/Pods-fearlessAll-fearless/Pods-fearlessAll-fearless.dev.xcconfig"; sourceTree = ""; }; 2BE0492B98AB9C1540846B39 /* StakingPayoutConfirmationViewFactory.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = StakingPayoutConfirmationViewFactory.swift; sourceTree = ""; }; + 2DF8ACFCE9BA5081C867CC8A /* Pods-fearlessTests.dev.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-fearlessTests.dev.xcconfig"; path = "Target Support Files/Pods-fearlessTests/Pods-fearlessTests.dev.xcconfig"; sourceTree = ""; }; 2E4B0600AFFB96A75CF98755 /* StakingRedeemProtocols.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = StakingRedeemProtocols.swift; sourceTree = ""; }; 2E57C70327E8AB3D00AF075A /* CrowdloanWikiTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CrowdloanWikiTableViewCell.swift; sourceTree = ""; }; 2E57C70A27E9EC0E00AF075A /* ProfileViewState.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfileViewState.swift; sourceTree = ""; }; @@ -2970,8 +2970,10 @@ 320E2207FB549F7C31A80441 /* SelectMarketViewController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = SelectMarketViewController.swift; sourceTree = ""; }; 3211D250E4167C916B8B9D6A /* NetworkIssuesNotificationRouter.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = NetworkIssuesNotificationRouter.swift; sourceTree = ""; }; 321FF178954097DF4B84780B /* BackupSelectWalletProtocols.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = BackupSelectWalletProtocols.swift; sourceTree = ""; }; + 32452A37191F6B6E6513ABB2 /* Pods-fearlessTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-fearlessTests.release.xcconfig"; path = "Target Support Files/Pods-fearlessTests/Pods-fearlessTests.release.xcconfig"; sourceTree = ""; }; 326260E461C031624CDB62BA /* WalletOptionInteractor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = WalletOptionInteractor.swift; sourceTree = ""; }; 32FDB8843EB793C85B222FDB /* SwapTransactionDetailViewController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = SwapTransactionDetailViewController.swift; sourceTree = ""; }; + 3301B6A6B110EF26845A5D23 /* Pods-fearlessAll-fearless.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-fearlessAll-fearless.release.xcconfig"; path = "Target Support Files/Pods-fearlessAll-fearless/Pods-fearlessAll-fearless.release.xcconfig"; sourceTree = ""; }; 336395FFC4B2104A9651A2DE /* StakingRewardPayoutsViewFactory.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = StakingRewardPayoutsViewFactory.swift; sourceTree = ""; }; 3558BD7D1B8CA1409BE74879 /* AccountManagementInteractor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = AccountManagementInteractor.swift; sourceTree = ""; }; 3574BADE9CF77599048C7010 /* CrowdloanContributionSetupWireframe.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = CrowdloanContributionSetupWireframe.swift; sourceTree = ""; }; @@ -2986,8 +2988,7 @@ 379D8325FB981E21B5E3B7A4 /* BackupRiskWarningsInteractor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = BackupRiskWarningsInteractor.swift; sourceTree = ""; }; 3837CE5CB2D48D8A694A7EE0 /* StakingPoolCreateConfirmPresenter.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = StakingPoolCreateConfirmPresenter.swift; sourceTree = ""; }; 385FE8691EA37DE9F562B34E /* CrowdloanContributionConfirmTests.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = CrowdloanContributionConfirmTests.swift; sourceTree = ""; }; - 3980A8591B1276B8F19E5A42 /* Pods-fearlessTests.dev.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-fearlessTests.dev.xcconfig"; path = "Target Support Files/Pods-fearlessTests/Pods-fearlessTests.dev.xcconfig"; sourceTree = ""; }; - 39AD5D68124FB540F0A6FB18 /* Pods-fearlessAll-fearlessIntegrationTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-fearlessAll-fearlessIntegrationTests.release.xcconfig"; path = "Target Support Files/Pods-fearlessAll-fearlessIntegrationTests/Pods-fearlessAll-fearlessIntegrationTests.release.xcconfig"; sourceTree = ""; }; + 3A67F1FD6E60AFA553FD890B /* Pods_fearlessAll_fearlessIntegrationTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_fearlessAll_fearlessIntegrationTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 3A75423ED5D55F8DC011DC03 /* BackupWalletImportedProtocols.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = BackupWalletImportedProtocols.swift; sourceTree = ""; }; 3A93673EEA8F71E8DDA84557 /* StakingRedeemWireframe.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = StakingRedeemWireframe.swift; sourceTree = ""; }; 3ABDA8952766DE724CD078D6 /* NodeSelectionPresenter.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = NodeSelectionPresenter.swift; sourceTree = ""; }; @@ -3011,6 +3012,7 @@ 4191E0055768541F6A3D8A61 /* StakingRewardPayoutsInteractor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = StakingRewardPayoutsInteractor.swift; sourceTree = ""; }; 41DFB2757D029FB5DF3CEBC2 /* WalletHistoryFilterProtocols.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = WalletHistoryFilterProtocols.swift; sourceTree = ""; }; 41E19988955B1C159EDA2555 /* WalletsManagmentPresenter.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = WalletsManagmentPresenter.swift; sourceTree = ""; }; + 420A0688DDCC05E2F5E8752C /* Pods-fearlessAll-fearless.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-fearlessAll-fearless.debug.xcconfig"; path = "Target Support Files/Pods-fearlessAll-fearless/Pods-fearlessAll-fearless.debug.xcconfig"; sourceTree = ""; }; 43B2963C83C33138F135F2F7 /* BackupWalletRouter.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = BackupWalletRouter.swift; sourceTree = ""; }; 446B4A7184327D64AE8F0610 /* WarningAlertProtocols.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = WarningAlertProtocols.swift; sourceTree = ""; }; 447FE0DC90DF4B4D13CADE62 /* NodeSelectionInteractor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = NodeSelectionInteractor.swift; sourceTree = ""; }; @@ -3024,7 +3026,6 @@ 48C158C8D1855BCE53636934 /* AccountCreateProtocols.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = AccountCreateProtocols.swift; sourceTree = ""; }; 4952E0B8F8DCD92FE4A37892 /* AddCustomNodeViewLayout.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = AddCustomNodeViewLayout.swift; sourceTree = ""; }; 49EBB77A32A59568B0DACFE5 /* StakingPoolCreateProtocols.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = StakingPoolCreateProtocols.swift; sourceTree = ""; }; - 4ACBD74CC337EC30702428CD /* Pods-fearlessAll-fearless.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-fearlessAll-fearless.debug.xcconfig"; path = "Target Support Files/Pods-fearlessAll-fearless/Pods-fearlessAll-fearless.debug.xcconfig"; sourceTree = ""; }; 4B3B14C046584AAAF483715F /* WalletTransactionHistoryWireframe.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = WalletTransactionHistoryWireframe.swift; sourceTree = ""; }; 4C0FA282377DCAB7C59ACFB6 /* RecommendedValidatorListViewController.xib */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = file.xib; path = RecommendedValidatorListViewController.xib; sourceTree = ""; }; 4C5EF68BE0E29D2305CB7337 /* UsernameSetupTests.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = UsernameSetupTests.swift; sourceTree = ""; }; @@ -3039,6 +3040,8 @@ 527CD27768E9A75E6CA87FE4 /* AccountConfirmTests.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = AccountConfirmTests.swift; sourceTree = ""; }; 52A64FCFC95E3841032F910B /* ChainSelectionTests.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ChainSelectionTests.swift; sourceTree = ""; }; 52F8D055D0481469073AA859 /* StakingPayoutConfirmationProtocols.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = StakingPayoutConfirmationProtocols.swift; sourceTree = ""; }; + 5337DD7DA3F506A0C7D2FE63 /* Pods-fearlessTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-fearlessTests.debug.xcconfig"; path = "Target Support Files/Pods-fearlessTests/Pods-fearlessTests.debug.xcconfig"; sourceTree = ""; }; + 53B6268E4FFFCBBABA8FB21A /* Pods_fearlessTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_fearlessTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 5408FF305E4A49A683BC43E0 /* WalletChainAccountDashboardViewLayout.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = WalletChainAccountDashboardViewLayout.swift; sourceTree = ""; }; 54467F2070858A3606E083F0 /* BackupCreatePasswordPresenter.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = BackupCreatePasswordPresenter.swift; sourceTree = ""; }; 54776237A20227DFE025E3AC /* AllDoneViewLayout.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = AllDoneViewLayout.swift; sourceTree = ""; }; @@ -3121,17 +3124,17 @@ 782CC21A2F9EEF5DBA3AB1AA /* PurchaseProtocols.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PurchaseProtocols.swift; sourceTree = ""; }; 784D20E16EEE55C2CF7B319B /* StakingBondMoreFlow.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = StakingBondMoreFlow.swift; sourceTree = ""; }; 78670B0926E92B75088D2D7B /* WalletHistoryFilterWireframe.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = WalletHistoryFilterWireframe.swift; sourceTree = ""; }; - 789C9DF406149A067E6A6262 /* Pods_fearlessAll_fearless.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_fearlessAll_fearless.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 7911693957DFAF141EBDAFEC /* StakingRewardPayoutsProtocols.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = StakingRewardPayoutsProtocols.swift; sourceTree = ""; }; 7926344BA1E07D8844F49069 /* BackupCreatePasswordTests.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = BackupCreatePasswordTests.swift; sourceTree = ""; }; 7931155840DACB340284ABBB /* PolkaswapTransaktionSettingsAssembly.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PolkaswapTransaktionSettingsAssembly.swift; sourceTree = ""; }; - 79BA4F7ADB3009C9930DEB9B /* Pods-fearlessTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-fearlessTests.release.xcconfig"; path = "Target Support Files/Pods-fearlessTests/Pods-fearlessTests.release.xcconfig"; sourceTree = ""; }; 7A9300C8D87BA997F21D3918 /* BackupSelectWalletRouter.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = BackupSelectWalletRouter.swift; sourceTree = ""; }; 7BCAF4A12D0F22D3C9035A1A /* WarningAlertPresenter.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = WarningAlertPresenter.swift; sourceTree = ""; }; 7C358C8AF370EE30400A2936 /* WalletSendTests.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = WalletSendTests.swift; sourceTree = ""; }; 7C70EBF83B2547452417E588 /* StakingRewardDetailsViewController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = StakingRewardDetailsViewController.swift; sourceTree = ""; }; 7D4F893132D221BB1020D929 /* BackupPasswordViewController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = BackupPasswordViewController.swift; sourceTree = ""; }; + 7D842AC151EE0CAFEF54C98A /* Pods-fearlessAll-fearlessIntegrationTests.dev.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-fearlessAll-fearlessIntegrationTests.dev.xcconfig"; path = "Target Support Files/Pods-fearlessAll-fearlessIntegrationTests/Pods-fearlessAll-fearlessIntegrationTests.dev.xcconfig"; sourceTree = ""; }; 7DDDB2B35CD3299F50613141 /* ReferralCrowdloanViewController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ReferralCrowdloanViewController.swift; sourceTree = ""; }; + 7E34231A711812575CCC70C4 /* Pods-fearlessAll-fearless.dev.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-fearlessAll-fearless.dev.xcconfig"; path = "Target Support Files/Pods-fearlessAll-fearless/Pods-fearlessAll-fearless.dev.xcconfig"; sourceTree = ""; }; 7E62CD2831DCF0A2D5DBB08F /* SelectValidatorsStartViewController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = SelectValidatorsStartViewController.swift; sourceTree = ""; }; 7EADA37D0D22D4CC99A7911A /* StakingPoolInfoViewController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = StakingPoolInfoViewController.swift; sourceTree = ""; }; 7ED5BEE4CC908012820FE89F /* NetworkInfoProtocols.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = NetworkInfoProtocols.swift; sourceTree = ""; }; @@ -4098,9 +4101,7 @@ 916347CF697C30CD455F436E /* WalletTransactionDetailsViewController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = WalletTransactionDetailsViewController.swift; sourceTree = ""; }; 91D44421CCD7AD220A05CD0E /* PurchaseInteractor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PurchaseInteractor.swift; sourceTree = ""; }; 9272FED2C00908028F223E5C /* ReferralCrowdloanTests.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ReferralCrowdloanTests.swift; sourceTree = ""; }; - 927C2D72C8D98AC63BE4AD2E /* Pods-fearlessAll-fearlessIntegrationTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-fearlessAll-fearlessIntegrationTests.debug.xcconfig"; path = "Target Support Files/Pods-fearlessAll-fearlessIntegrationTests/Pods-fearlessAll-fearlessIntegrationTests.debug.xcconfig"; sourceTree = ""; }; 92C5ADE8E747D09E52853AAD /* WalletScanQRProtocols.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = WalletScanQRProtocols.swift; sourceTree = ""; }; - 92DAF74E607D228641524ECB /* Pods-fearlessAll-fearlessIntegrationTests.dev.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-fearlessAll-fearlessIntegrationTests.dev.xcconfig"; path = "Target Support Files/Pods-fearlessAll-fearlessIntegrationTests/Pods-fearlessAll-fearlessIntegrationTests.dev.xcconfig"; sourceTree = ""; }; 934678CCA0EF35B6AE4AE8A1 /* StakingRewardPayoutsTests.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = StakingRewardPayoutsTests.swift; sourceTree = ""; }; 93B26AA9CB558F02F69FF59B /* ExportMnemonicConfirmWireframe.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ExportMnemonicConfirmWireframe.swift; sourceTree = ""; }; 9403C5F9C88A4690C62A204B /* StakingRewardDestConfirmTests.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = StakingRewardDestConfirmTests.swift; sourceTree = ""; }; @@ -4295,7 +4296,6 @@ B8D9DD27C76FE239728ED5F8 /* StakingPoolCreateInteractor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = StakingPoolCreateInteractor.swift; sourceTree = ""; }; B90CEC70F101AA25A4C00021 /* YourValidatorListViewController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = YourValidatorListViewController.swift; sourceTree = ""; }; B93A1BA7DFEE1D7728B84949 /* AccountExportPasswordTests.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = AccountExportPasswordTests.swift; sourceTree = ""; }; - B96095042201CC601DF6A5B4 /* Pods-fearlessAll-fearless.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-fearlessAll-fearless.release.xcconfig"; path = "Target Support Files/Pods-fearlessAll-fearless/Pods-fearlessAll-fearless.release.xcconfig"; sourceTree = ""; }; B9BD51B1F823EB28D7DB0C2D /* BannersTests.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = BannersTests.swift; sourceTree = ""; }; BAB2478DE3AF0885A3ED7ED8 /* StakingRedeemPresenter.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = StakingRedeemPresenter.swift; sourceTree = ""; }; BB5E8FAB4C12D7BFEEF576AD /* AnalyticsRewardDetailsWireframe.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = AnalyticsRewardDetailsWireframe.swift; sourceTree = ""; }; @@ -4311,6 +4311,7 @@ C23EA8830B337C4F8142A395 /* AddCustomNodeTests.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = AddCustomNodeTests.swift; sourceTree = ""; }; C2956D0C69019DDCDAB2EB34 /* CustomValidatorListViewLayout.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = CustomValidatorListViewLayout.swift; sourceTree = ""; }; C316BE4F5A0342D379F783E8 /* StartSelectValidatorsTests.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = StartSelectValidatorsTests.swift; sourceTree = ""; }; + C385925D32737B808FA4DFD8 /* Pods_fearlessAll_fearless.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_fearlessAll_fearless.framework; sourceTree = BUILT_PRODUCTS_DIR; }; C503100478AB56E903598A78 /* ReferralCrowdloanPresenter.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ReferralCrowdloanPresenter.swift; sourceTree = ""; }; C569B746953D3BA947ACEA8D /* ChainSelectionViewController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ChainSelectionViewController.swift; sourceTree = ""; }; C597BAB74DF23914B68FDC39 /* SwapTransactionDetailAssembly.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = SwapTransactionDetailAssembly.swift; sourceTree = ""; }; @@ -4318,6 +4319,7 @@ C600C4D628053DF500111316 /* UsernameSetupViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UsernameSetupViewController.swift; sourceTree = ""; }; C600C4D828054A1B00111316 /* AccountCreateFlow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccountCreateFlow.swift; sourceTree = ""; }; C603E81028583C2A00007B72 /* StakingMainRelaychainStrategy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StakingMainRelaychainStrategy.swift; sourceTree = ""; }; + C606D6CC2A8DD0E900D456D9 /* SoraCardInitializer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SoraCardInitializer.swift; sourceTree = ""; }; C615668029309D3900391BF3 /* QRService.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = QRService.swift; sourceTree = ""; }; C61566842930A07900391BF3 /* QRCreationOperation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = QRCreationOperation.swift; sourceTree = ""; }; C6264C282799A56E00FCA0DB /* WalletDetailsTableCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WalletDetailsTableCell.swift; sourceTree = ""; }; @@ -4445,7 +4447,6 @@ D5B7937620F4339EE948EC25 /* AddCustomNodePresenter.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = AddCustomNodePresenter.swift; sourceTree = ""; }; D613E20E96E7BA5B8F4B9799 /* StakingRewardDetailsInteractor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = StakingRewardDetailsInteractor.swift; sourceTree = ""; }; D6470B066E67834BF97E0A68 /* StakingRewardDetailsPresenter.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = StakingRewardDetailsPresenter.swift; sourceTree = ""; }; - D67A02F84D78AFE5E37356ED /* Pods_fearlessAll_fearlessIntegrationTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_fearlessAll_fearlessIntegrationTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; D6C6573C52692E4A56E35FF9 /* RecommendedValidatorListProtocols.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = RecommendedValidatorListProtocols.swift; sourceTree = ""; }; D733A49D80BA2BF400AF23A6 /* StakingPoolCreateViewLayout.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = StakingPoolCreateViewLayout.swift; sourceTree = ""; }; D73DB18B64AF4403E39D5EBB /* FiltersPresenter.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = FiltersPresenter.swift; sourceTree = ""; }; @@ -4481,6 +4482,7 @@ E9636093217ABE05A7FAC9B9 /* AccountCreateViewFactory.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = AccountCreateViewFactory.swift; sourceTree = ""; }; EB8605FD90D8C3553A9897B4 /* AccountImportPresenter.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = AccountImportPresenter.swift; sourceTree = ""; }; EC70B2E02A12C9E0FB2CDB17 /* BannersAssembly.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = BannersAssembly.swift; sourceTree = ""; }; + EC8C92E7FDD44EBAD92804EA /* Pods-fearlessAll-fearlessIntegrationTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-fearlessAll-fearlessIntegrationTests.release.xcconfig"; path = "Target Support Files/Pods-fearlessAll-fearlessIntegrationTests/Pods-fearlessAll-fearlessIntegrationTests.release.xcconfig"; sourceTree = ""; }; ECB733351DB8DE9825D07B28 /* BackupRiskWarningsTests.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = BackupRiskWarningsTests.swift; sourceTree = ""; }; ECBF10B7D4707E4D7D6387CF /* FiltersViewFactory.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = FiltersViewFactory.swift; sourceTree = ""; }; EDB9EDB05686DF11958145E1 /* ControllerAccountWireframe.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ControllerAccountWireframe.swift; sourceTree = ""; }; @@ -5402,7 +5404,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 37B691BD838989C4BB538FB5 /* Pods_fearlessAll_fearlessIntegrationTests.framework in Frameworks */, + 7D13EAF8A650DD2053DC3E16 /* Pods_fearlessAll_fearlessIntegrationTests.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -5410,7 +5412,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 215DB62F06780ED5176E5743 /* Pods_fearlessAll_fearless.framework in Frameworks */, + F6081801997433B8DB5E832C /* Pods_fearlessAll_fearless.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -5418,7 +5420,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 1CB4787BD6681E80B72AB102 /* Pods_fearlessTests.framework in Frameworks */, + 0675CC47DB18F7EFE67DA611 /* Pods_fearlessTests.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -6021,6 +6023,16 @@ path = BackupRiskWarnings; sourceTree = ""; }; + 10782A192AF0BB4548BC5CC6 /* Frameworks */ = { + isa = PBXGroup; + children = ( + C385925D32737B808FA4DFD8 /* Pods_fearlessAll_fearless.framework */, + 3A67F1FD6E60AFA553FD890B /* Pods_fearlessAll_fearlessIntegrationTests.framework */, + 53B6268E4FFFCBBABA8FB21A /* Pods_fearlessTests.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; 1132E923A881889011B3D2A6 /* ChainAccountBalanceList */ = { isa = PBXGroup; children = ( @@ -6162,15 +6174,15 @@ 2698CD398B0412EB85D620AB /* Pods */ = { isa = PBXGroup; children = ( - 4ACBD74CC337EC30702428CD /* Pods-fearlessAll-fearless.debug.xcconfig */, - 2B652657F26C50D936CDB0AA /* Pods-fearlessAll-fearless.dev.xcconfig */, - B96095042201CC601DF6A5B4 /* Pods-fearlessAll-fearless.release.xcconfig */, - 927C2D72C8D98AC63BE4AD2E /* Pods-fearlessAll-fearlessIntegrationTests.debug.xcconfig */, - 92DAF74E607D228641524ECB /* Pods-fearlessAll-fearlessIntegrationTests.dev.xcconfig */, - 39AD5D68124FB540F0A6FB18 /* Pods-fearlessAll-fearlessIntegrationTests.release.xcconfig */, - 1CBC3327A727BEC12CC51AE7 /* Pods-fearlessTests.debug.xcconfig */, - 3980A8591B1276B8F19E5A42 /* Pods-fearlessTests.dev.xcconfig */, - 79BA4F7ADB3009C9930DEB9B /* Pods-fearlessTests.release.xcconfig */, + 420A0688DDCC05E2F5E8752C /* Pods-fearlessAll-fearless.debug.xcconfig */, + 7E34231A711812575CCC70C4 /* Pods-fearlessAll-fearless.dev.xcconfig */, + 3301B6A6B110EF26845A5D23 /* Pods-fearlessAll-fearless.release.xcconfig */, + 25A667173FD5472A339D4951 /* Pods-fearlessAll-fearlessIntegrationTests.debug.xcconfig */, + 7D842AC151EE0CAFEF54C98A /* Pods-fearlessAll-fearlessIntegrationTests.dev.xcconfig */, + EC8C92E7FDD44EBAD92804EA /* Pods-fearlessAll-fearlessIntegrationTests.release.xcconfig */, + 5337DD7DA3F506A0C7D2FE63 /* Pods-fearlessTests.debug.xcconfig */, + 2DF8ACFCE9BA5081C867CC8A /* Pods-fearlessTests.dev.xcconfig */, + 32452A37191F6B6E6513ABB2 /* Pods-fearlessTests.release.xcconfig */, ); path = Pods; sourceTree = ""; @@ -8021,7 +8033,7 @@ 849013A924A80984008F705E /* Products */, 2698CD398B0412EB85D620AB /* Pods */, 84CFF1CA26526C4700DB7CF7 /* Recovered References */, - B0149E798B7A8F38538FFD8A /* Frameworks */, + 10782A192AF0BB4548BC5CC6 /* Frameworks */, ); sourceTree = ""; }; @@ -10468,16 +10480,6 @@ path = View; sourceTree = ""; }; - B0149E798B7A8F38538FFD8A /* Frameworks */ = { - isa = PBXGroup; - children = ( - 789C9DF406149A067E6A6262 /* Pods_fearlessAll_fearless.framework */, - D67A02F84D78AFE5E37356ED /* Pods_fearlessAll_fearlessIntegrationTests.framework */, - 2060CFD77C64FD551E67508F /* Pods_fearlessTests.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; B4FD69DE2FF04D8B341B8942 /* BackupWalletImported */ = { isa = PBXGroup; children = ( @@ -12087,6 +12089,7 @@ FA38C9A32760700B005C5577 /* Services */ = { isa = PBXGroup; children = ( + C606D6CC2A8DD0E900D456D9 /* SoraCardInitializer.swift */, 073417AE298BA28300104F41 /* Equilibrium */, 0713097B28C6387B002B17D0 /* ScamService */, FA99426E2805524200D771E5 /* GetBalanceProvider */, @@ -13465,11 +13468,11 @@ isa = PBXNativeTarget; buildConfigurationList = 8438E1D624BFAAD2001BDB13 /* Build configuration list for PBXNativeTarget "fearlessIntegrationTests" */; buildPhases = ( - F91CA50480B70DE0E4D2B7C4 /* [CP] Check Pods Manifest.lock */, + A1F316283DB0581DD481402F /* [CP] Check Pods Manifest.lock */, 8438E1CB24BFAAD2001BDB13 /* Sources */, 8438E1CC24BFAAD2001BDB13 /* Frameworks */, 8438E1CD24BFAAD2001BDB13 /* Resources */, - 07CF6715C0265BB9CD2CA3AD /* [CP] Embed Pods Frameworks */, + 8C060D0B1D7A72A5356874D6 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -13485,7 +13488,7 @@ isa = PBXNativeTarget; buildConfigurationList = 849013C724A80986008F705E /* Build configuration list for PBXNativeTarget "fearless" */; buildPhases = ( - 74F929392E88BF977A22B2C3 /* [CP] Check Pods Manifest.lock */, + 17F896256CC8D22C9A787280 /* [CP] Check Pods Manifest.lock */, AE2060202636DA5900357578 /* Inject keys */, F472A8D6261758DE003C58BC /* SwiftFormat */, 849013CD24A92260008F705E /* Swiftlint */, @@ -13493,7 +13496,7 @@ 849013A424A80984008F705E /* Sources */, 849013A524A80984008F705E /* Frameworks */, 849013A624A80984008F705E /* Resources */, - D624C8FC742CE4AF8AE5DF96 /* [CP] Embed Pods Frameworks */, + 64B3E13A1198B278FCBF438C /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -13508,13 +13511,13 @@ isa = PBXNativeTarget; buildConfigurationList = 849013CA24A80986008F705E /* Build configuration list for PBXNativeTarget "fearlessTests" */; buildPhases = ( - D4695DB8B48971A470980297 /* [CP] Check Pods Manifest.lock */, + 4C7510AEC701C23D0AA7DA11 /* [CP] Check Pods Manifest.lock */, 842D1E8824D207C700C30A7A /* Modules Mock */, 842D1E8924D207D900C30A7A /* Common Mock */, 849013BA24A80986008F705E /* Sources */, 849013BB24A80986008F705E /* Frameworks */, 849013BC24A80986008F705E /* Resources */, - AB3031130FF4DD308120005F /* [CP] Embed Pods Frameworks */, + 8AB8DBD7AC5AB489D7430255 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -13662,24 +13665,29 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 07CF6715C0265BB9CD2CA3AD /* [CP] Embed Pods Frameworks */ = { + 17F896256CC8D22C9A787280 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-fearlessAll-fearlessIntegrationTests/Pods-fearlessAll-fearlessIntegrationTests-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); - name = "[CP] Embed Pods Frameworks"; + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-fearlessAll-fearlessIntegrationTests/Pods-fearlessAll-fearlessIntegrationTests-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-fearlessAll-fearless-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-fearlessAll-fearlessIntegrationTests/Pods-fearlessAll-fearlessIntegrationTests-frameworks.sh\"\n"; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - 74F929392E88BF977A22B2C3 /* [CP] Check Pods Manifest.lock */ = { + 4C7510AEC701C23D0AA7DA11 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -13694,13 +13702,30 @@ outputFileListPaths = ( ); outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-fearlessAll-fearless-checkManifestLockResult.txt", + "$(DERIVED_FILE_DIR)/Pods-fearlessTests-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; + 64B3E13A1198B278FCBF438C /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-fearlessAll-fearless/Pods-fearlessAll-fearless-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-fearlessAll-fearless/Pods-fearlessAll-fearless-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-fearlessAll-fearless/Pods-fearlessAll-fearless-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; 842D1E8824D207C700C30A7A /* Modules Mock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -13775,7 +13800,7 @@ shellPath = /bin/sh; shellScript = "\"$PODS_ROOT/R.swift/rswift\" generate \"$PROJECT_DIR/R.generated.swift\"\n"; }; - AB3031130FF4DD308120005F /* [CP] Embed Pods Frameworks */ = { + 8AB8DBD7AC5AB489D7430255 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -13792,27 +13817,24 @@ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-fearlessTests/Pods-fearlessTests-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - AE2060202636DA5900357578 /* Inject keys */ = { + 8C060D0B1D7A72A5356874D6 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-fearlessAll-fearlessIntegrationTests/Pods-fearlessAll-fearlessIntegrationTests-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); - inputPaths = ( - ); - name = "Inject keys"; + name = "[CP] Embed Pods Frameworks"; outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/CIKeys.generated.swift", - $PROJECT_DIR/CIKeys.generated.swift, + "${PODS_ROOT}/Target Support Files/Pods-fearlessAll-fearlessIntegrationTests/Pods-fearlessAll-fearlessIntegrationTests-frameworks-${CONFIGURATION}-output-files.xcfilelist", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "#check if env-vars.sh exists\nif [ -f $PROJECT_DIR/$PROJECT_NAME/env-vars.sh ]\nthen\nsource $PROJECT_DIR/$PROJECT_NAME/env-vars.sh\nfi\n#no `else` case needed if the CI works as expected\n\nWORK_DIR=\"$PROJECT_DIR/$PROJECT_NAME\"\necho \"Sourcery Work Directory = $WORK_DIR\"\n\nOUT_FILE=\"$PROJECT_DIR/CIKeys.generated.swift\"\necho \"Sourcery Output File = $OUT_FILE\"\n\n\"$PODS_ROOT/Sourcery/bin/sourcery\" --templates \"$WORK_DIR\" --sources \"$WORK_DIR\" --output \"$OUT_FILE\" --args moonPaySecretKey=$MOONPAY_PRODUCTION_SECRET,moonPayTestSecretKey=$MOONPAY_TEST_SECRET,subscanAPIKey=$SUBSCAN_API_KEY,webClientIdRelease=$WEB_CLIENT_ID_RELEASE,fearlessGoogleUrlSchemeRelease=$FEARLESS_GOOGLE_URL_SCHEME_RELEASE,webClientIdDebug=$WEB_CLIENT_ID_DEBUG,fearlessGoogleUrlSchemeDebug=$FEARLESS_GOOGLE_URL_SCHEME_DEBUG\n\n#add params to the xcconfig files\nvariableNames=(\"FEARLESS_GOOGLE_TOKEN\" \"FEARLESS_GOOGLE_URL_SCHEME\")\n\n# Iterate over the array\nfor variableName in \"${variableNames[@]}\"; do\n for file in \"$PROJECT_DIR\"/fearless/Configs/*.xcconfig; do\n if ! grep -q \"^$variableName = ${!variableName}$\" \"$file\"; then\n echo \"$variableName = ${!variableName}\" >> \"$file\"\n fi\n done\ndone\n\n/usr/libexec/PlistBuddy -c \"Set :CFBundleURLTypes:0:CFBundleURLSchemes:0 $FEARLESS_GOOGLE_URL_SCHEME\" \"$PROJECT_DIR\"/fearless/Info.plist\n\n/usr/libexec/PlistBuddy -c \"Set :GIDClientID $FEARLESS_GOOGLE_TOKEN\" \"$PROJECT_DIR\"/fearless/Info.plist\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-fearlessAll-fearlessIntegrationTests/Pods-fearlessAll-fearlessIntegrationTests-frameworks.sh\"\n"; + showEnvVarsInLog = 0; }; - D4695DB8B48971A470980297 /* [CP] Check Pods Manifest.lock */ = { + A1F316283DB0581DD481402F /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -13827,31 +13849,14 @@ outputFileListPaths = ( ); outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-fearlessTests-checkManifestLockResult.txt", + "$(DERIVED_FILE_DIR)/Pods-fearlessAll-fearlessIntegrationTests-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - D624C8FC742CE4AF8AE5DF96 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-fearlessAll-fearless/Pods-fearlessAll-fearless-frameworks-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Embed Pods Frameworks"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-fearlessAll-fearless/Pods-fearlessAll-fearless-frameworks-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-fearlessAll-fearless/Pods-fearlessAll-fearless-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - F472A8D6261758DE003C58BC /* SwiftFormat */ = { + AE2060202636DA5900357578 /* Inject keys */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -13860,16 +13865,18 @@ ); inputPaths = ( ); - name = SwiftFormat; + name = "Inject keys"; outputFileListPaths = ( ); outputPaths = ( + "$(DERIVED_FILE_DIR)/CIKeys.generated.swift", + $PROJECT_DIR/CIKeys.generated.swift, ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/SwiftFormat/CommandLineTool/swiftformat\" \"$SRCROOT/fearless\"\n"; + shellScript = "#check if env-vars.sh exists\nif [ -f $PROJECT_DIR/$PROJECT_NAME/env-vars.sh ]\nthen\nsource $PROJECT_DIR/$PROJECT_NAME/env-vars.sh\nfi\n#no `else` case needed if the CI works as expected\n\nWORK_DIR=\"$PROJECT_DIR/$PROJECT_NAME\"\necho \"Sourcery Work Directory = $WORK_DIR\"\n\nOUT_FILE=\"$PROJECT_DIR/CIKeys.generated.swift\"\necho \"Sourcery Output File = $OUT_FILE\"\n\n\"$PODS_ROOT/Sourcery/bin/sourcery\" --templates \"$WORK_DIR\" --sources \"$WORK_DIR\" --output \"$OUT_FILE\" --args moonPaySecretKey=$MOONPAY_PRODUCTION_SECRET,moonPayTestSecretKey=$MOONPAY_TEST_SECRET,subscanAPIKey=$SUBSCAN_API_KEY,webClientIdRelease=$WEB_CLIENT_ID_RELEASE,fearlessGoogleUrlSchemeRelease=$FEARLESS_GOOGLE_URL_SCHEME_RELEASE,webClientIdDebug=$WEB_CLIENT_ID_DEBUG,fearlessGoogleUrlSchemeDebug=$FEARLESS_GOOGLE_URL_SCHEME_DEBUG,soraCardAPIKeyTest=$SORA_CARD_API_KEY_TEST,soraCardAPIKeyProd=$SORA_CARD_API_KEY_PROD,soraCardDomainTest=$SORA_CARD_DOMAIN_TEST,soraCardDomainProd=$SORA_CARD_DOMAIN_PROD,soraCardKYCEndpointUrlTest=$SORA_CARD_KYC_ENDPOINT_URL_TEST,,soraCardKYCEndpointUrlProd=$SORA_CARD_KYC_ENDPOINT_URL_PROD,soraCardKycUsernameTest=$SORA_CARD_KYC_USERNAME_TEST,soraCardKycUsernameProd=$SORA_CARD_KYC_USERNAME_PROD,soraCardKycPasswordTest=$SORA_CARD_KYC_PASSWORD_TEST,soraCardKycPasswordProd=$SORA_CARD_KYC_PASSWORD_PROD,soraCardBackendTestUrl=$SORA_BACKEND_DEBUG,soraCardBackendProdUrl=$SORA_BACKEND_RELEASE,soraCardXOneEndpointTest=$X1_ENDPOINT_URL_DEBUG,soraCardXOneEndpointProd=$X1_ENDPOINT_URL_RELEASE,soraCardXOneIdTest=$X1_WIDGET_ID_DEBUG,soraCardXOneIdProd=$X1_WIDGET_ID_RELEASE,paywingsRepositoryUrl=$PAY_WINGS_REPOSITORY_URL,paywingsUsername=$PAY_WINGS_USERNAME,paywingsPassword=$PAY_WINGS_PASSWORD,soraGoogleUrlScheme=$SORA_GOOGLE_URL_SCHEME,soraGoogleToken=$SORA_GOOGLE_TOKEN\n\n#add params to the xcconfig files\nvariableNames=(\"FEARLESS_GOOGLE_TOKEN\" \"FEARLESS_GOOGLE_URL_SCHEME\")\n\n# Iterate over the array\nfor variableName in \"${variableNames[@]}\"; do\n for file in \"$PROJECT_DIR\"/fearless/Configs/*.xcconfig; do\n if ! grep -q \"^$variableName = ${!variableName}$\" \"$file\"; then\n echo \"$variableName = ${!variableName}\" >> \"$file\"\n fi\n done\ndone\n\n/usr/libexec/PlistBuddy -c \"Set :CFBundleURLTypes:0:CFBundleURLSchemes:0 $FEARLESS_GOOGLE_URL_SCHEME\" \"$PROJECT_DIR\"/fearless/Info.plist\n\n/usr/libexec/PlistBuddy -c \"Set :GIDClientID $FEARLESS_GOOGLE_TOKEN\" \"$PROJECT_DIR\"/fearless/Info.plist\n"; }; - F91CA50480B70DE0E4D2B7C4 /* [CP] Check Pods Manifest.lock */ = { + F472A8D6261758DE003C58BC /* SwiftFormat */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -13877,19 +13884,15 @@ inputFileListPaths = ( ); inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", ); - name = "[CP] Check Pods Manifest.lock"; + name = SwiftFormat; outputFileListPaths = ( ); outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-fearlessAll-fearlessIntegrationTests-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; + shellScript = "\"${PODS_ROOT}/SwiftFormat/CommandLineTool/swiftformat\" \"$SRCROOT/fearless\"\n"; }; /* End PBXShellScriptBuildPhase section */ @@ -15081,6 +15084,7 @@ FAA0136828DA12E3000A5230 /* StakingRedeemConfirmationViewModel.swift in Sources */, 849ABE6D2627949E00011A2A /* BatchMapper.swift in Sources */, FAFFAE7E29AC84B10074AF1F /* SubqueryDelegatorHistoryData.swift in Sources */, + C606D6CD2A8DD0E900D456D9 /* SoraCardInitializer.swift in Sources */, FAE5F62F27B2383E00F13206 /* AddCustomNodeViewState.swift in Sources */, FAFFAE4029AC84850074AF1F /* AccountManagementPresentable.swift in Sources */, FA15BC152823CB7B0037C023 /* ParachainCollatorOperationFactory.swift in Sources */, @@ -16570,7 +16574,7 @@ /* Begin XCBuildConfiguration section */ 8438E1D724BFAAD2001BDB13 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 927C2D72C8D98AC63BE4AD2E /* Pods-fearlessAll-fearlessIntegrationTests.debug.xcconfig */; + baseConfigurationReference = 25A667173FD5472A339D4951 /* Pods-fearlessAll-fearlessIntegrationTests.debug.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; @@ -16592,7 +16596,7 @@ }; 8438E1D824BFAAD2001BDB13 /* Dev */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 92DAF74E607D228641524ECB /* Pods-fearlessAll-fearlessIntegrationTests.dev.xcconfig */; + baseConfigurationReference = 7D842AC151EE0CAFEF54C98A /* Pods-fearlessAll-fearlessIntegrationTests.dev.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; @@ -16614,7 +16618,7 @@ }; 8438E1D924BFAAD2001BDB13 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 39AD5D68124FB540F0A6FB18 /* Pods-fearlessAll-fearlessIntegrationTests.release.xcconfig */; + baseConfigurationReference = EC8C92E7FDD44EBAD92804EA /* Pods-fearlessAll-fearlessIntegrationTests.release.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; @@ -16805,7 +16809,7 @@ }; 849013CB24A80986008F705E /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 1CBC3327A727BEC12CC51AE7 /* Pods-fearlessTests.debug.xcconfig */; + baseConfigurationReference = 5337DD7DA3F506A0C7D2FE63 /* Pods-fearlessTests.debug.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)"; BUNDLE_LOADER = "$(TEST_HOST)"; @@ -16830,7 +16834,7 @@ }; 849013CC24A80986008F705E /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 79BA4F7ADB3009C9930DEB9B /* Pods-fearlessTests.release.xcconfig */; + baseConfigurationReference = 32452A37191F6B6E6513ABB2 /* Pods-fearlessTests.release.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)"; BUNDLE_LOADER = "$(TEST_HOST)"; @@ -16943,7 +16947,7 @@ }; 8490140024A92A27008F705E /* Dev */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 3980A8591B1276B8F19E5A42 /* Pods-fearlessTests.dev.xcconfig */; + baseConfigurationReference = 2DF8ACFCE9BA5081C867CC8A /* Pods-fearlessTests.dev.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)"; BUNDLE_LOADER = "$(TEST_HOST)"; diff --git a/fearless/ApplicationLayer/Services/SoraCardInitializer.swift b/fearless/ApplicationLayer/Services/SoraCardInitializer.swift new file mode 100644 index 0000000000..f05d7e4321 --- /dev/null +++ b/fearless/ApplicationLayer/Services/SoraCardInitializer.swift @@ -0,0 +1,97 @@ +import SCard +import SoraFoundation +import RobinHood +import SSFModels +import SoraUIKit + +final class SoraCardInitializer { + private let wallet: MetaAccountModel + private let soraChainAsset: ChainAsset + private let accountInfoSubscriptionAdapter: AccountInfoSubscriptionAdapter + var onSwapController: ((UIViewController) -> Void)? + + init( + wallet: MetaAccountModel, + soraChainAsset: ChainAsset, + accountInfoSubscriptionAdapter: AccountInfoSubscriptionAdapter + ) { + self.wallet = wallet + self.soraChainAsset = soraChainAsset + self.accountInfoSubscriptionAdapter = accountInfoSubscriptionAdapter + } + + private func initSoraCard() -> SCard { + guard SCard.shared == nil else { return SCard.shared! } + + let addressProvider: () -> String = { [weak self] in + guard let strongSelf = self, + let accountId = strongSelf.wallet.fetch(for: strongSelf.soraChainAsset.chain.accountRequest())?.accountId else { return String() } + + let address = try? AddressFactory.address( + for: accountId, + chain: strongSelf.soraChainAsset.chain + ) + return address ?? String() + } + + let xorBalanceStream = SCStream(wrappedValue: Decimal(0)) + + let soraCard = SCard( + addressProvider: addressProvider, + config: .local, + balanceStream: xorBalanceStream, + onSwapController: { [weak self] vc in + self?.onSwapController?(vc) + } + ) + + SCard.shared = soraCard + + LocalizationManager.shared.addObserver(with: soraCard) { [weak soraCard] _, newLocalization in + soraCard?.selectedLocalization = newLocalization + } + + return soraCard + } +} + +extension SCard.Config { + static let prod = SCard.Config( + backendUrl: SoraCardCIKeys.backendProdUrl, + pwAuthDomain: SoraCardCIKeys.domainProd, + pwApiKey: SoraCardCIKeys.apiKeyProd, + kycUrl: SoraCardCIKeys.kycEndpointUrlProd, + kycUsername: SoraCardCIKeys.kycUsernameProd, + kycPassword: SoraCardCIKeys.kycPasswordProd, + xOneEndpoint: SoraCardCIKeys.xOneEndpointProd, + xOneId: SoraCardCIKeys.xOneIdProd, + environmentType: .prod, + themeMode: SoramitsuUI.shared.themeMode + ) + + static let test = SCard.Config( + backendUrl: SoraCardCIKeys.backendTestUrl, + pwAuthDomain: SoraCardCIKeys.domainTest, + pwApiKey: SoraCardCIKeys.apiKeyTest, + kycUrl: SoraCardCIKeys.kycEndpointUrlTest, + kycUsername: SoraCardCIKeys.kycUsernameTest, + kycPassword: SoraCardCIKeys.kycPasswordTest, + xOneEndpoint: SoraCardCIKeys.xOneEndpointTest, + xOneId: SoraCardCIKeys.xOneIdTest, + environmentType: .test, + themeMode: SoramitsuUI.shared.themeMode + ) + + static let local = SCard.Config( + backendUrl: "https://backend.dev.sora-card.tachi.soramitsu.co.jp/", + pwAuthDomain: "soracard.com", + pwApiKey: "6974528a-ee11-4509-b549-a8d02c1aec0d", + kycUrl: "https://kyc-test.soracard.com/mobile", + kycUsername: "E7A6CB83-630E-4D24-88C5-18AAF96032A4", + kycPassword: "75A55B7E-A18F-4498-9092-58C7D6BDB333", + xOneEndpoint: "https://dev.x1ex.com/widgets/sdk.js", + xOneId: "sprkwdgt-WYL6QBNC", + environmentType: .test, + themeMode: SoramitsuUI.shared.themeMode + ) +} diff --git a/fearless/CIKeys.stencil b/fearless/CIKeys.stencil index d67f6aebd0..60a1cbf4ce 100644 --- a/fearless/CIKeys.stencil +++ b/fearless/CIKeys.stencil @@ -13,6 +13,23 @@ enum SoraCardCIKeys { static var endpoint: String = "{{ argument.soraCardKycEndpoint }}" static var username: String = "{{ argument.soraCardKycUsername }}" static var password: String = "{{ argument.soraCardKycPassword }}" + + static var backendTestUrl: String = "{{ argument.soraCardBackendTestUrl }}" + static var backendProdUrl: String = "{{ argument.soraCardBackendProdUrl }}" + static var apiKeyTest: String = "{{ argument.soraCardAPIKeyTest }}" + static var apiKeyProd: String = "{{ argument.soraCardAPIKeyProd }}" + static var domainTest: String = "{{ argument.soraCardDomainTest }}" + static var domainProd: String = "{{ argument.soraCardDomainProd }}" + static var kycEndpointUrlTest: String = "{{ argument.soraCardKYCEndpointUrlTest }}" + static var kycEndpointUrlProd: String = "{{ argument.soraCardKYCEndpointUrlProd }}" + static var kycUsernameTest: String = "{{ argument.soraCardKycUsernameTest }}" + static var kycUsernameProd: String = "{{ argument.soraCardKycUsernameProd }}" + static var kycPasswordTest: String = "{{ argument.soraCardKycPasswordTest }}" + static var kycPasswordProd: String = "{{ argument.soraCardKycPasswordProd }}" + static var xOneEndpointTest: String = "{{ argument.soraCardXOneEndpointTest }}" + static var xOneEndpointProd: String = "{{ argument.soraCardXOneEndpointProd }}" + static var xOneIdTest: String = "{{ argument.soraCardXOneIdTest }}" + static var xOneIdProd: String = "{{ argument.soraCardXOneIdProd }}" } enum PayWingsCIKeys { From b30e3d4bc28d632f513ab7bd8d6eee77f7059967 Mon Sep 17 00:00:00 2001 From: Denis Lebedko Date: Tue, 22 Aug 2023 20:38:24 +0700 Subject: [PATCH 2/5] module integration --- .../Services/SoraCardInitializer.swift | 10 ++-- .../Common/Helpers/ChainAssetsFetching.swift | 2 +- .../ChainAssetListAssembly.swift | 9 ++- .../ChainAssetListInteractor.swift | 59 +++++++++++++++++++ .../ChainAssetListPresenter.swift | 42 ++++++++++++- .../ChainAssetListProtocols.swift | 11 ++++ .../ChainAssetList/ChainAssetListRouter.swift | 15 +++++ .../ChainAssetListViewController.swift | 6 ++ .../ChainAssetListViewLayout.swift | 7 +++ .../ViewModel/ChainAssetListViewModel.swift | 3 + .../ChainAssetListViewModelFactory.swift | 24 +++++++- 11 files changed, 177 insertions(+), 11 deletions(-) diff --git a/fearless/ApplicationLayer/Services/SoraCardInitializer.swift b/fearless/ApplicationLayer/Services/SoraCardInitializer.swift index f05d7e4321..30ed53aeff 100644 --- a/fearless/ApplicationLayer/Services/SoraCardInitializer.swift +++ b/fearless/ApplicationLayer/Services/SoraCardInitializer.swift @@ -8,7 +8,7 @@ final class SoraCardInitializer { private let wallet: MetaAccountModel private let soraChainAsset: ChainAsset private let accountInfoSubscriptionAdapter: AccountInfoSubscriptionAdapter - var onSwapController: ((UIViewController) -> Void)? + var onSwapHandler: ((UIViewController) -> Void)? init( wallet: MetaAccountModel, @@ -20,18 +20,18 @@ final class SoraCardInitializer { self.accountInfoSubscriptionAdapter = accountInfoSubscriptionAdapter } - private func initSoraCard() -> SCard { + func initSoraCard() -> SCard { guard SCard.shared == nil else { return SCard.shared! } let addressProvider: () -> String = { [weak self] in guard let strongSelf = self, - let accountId = strongSelf.wallet.fetch(for: strongSelf.soraChainAsset.chain.accountRequest())?.accountId else { return String() } + let accountId = strongSelf.wallet.fetch(for: strongSelf.soraChainAsset.chain.accountRequest())?.accountId else { return "" } let address = try? AddressFactory.address( for: accountId, chain: strongSelf.soraChainAsset.chain ) - return address ?? String() + return address ?? "" } let xorBalanceStream = SCStream(wrappedValue: Decimal(0)) @@ -41,7 +41,7 @@ final class SoraCardInitializer { config: .local, balanceStream: xorBalanceStream, onSwapController: { [weak self] vc in - self?.onSwapController?(vc) + self?.onSwapHandler?(vc) } ) diff --git a/fearless/Common/Helpers/ChainAssetsFetching.swift b/fearless/Common/Helpers/ChainAssetsFetching.swift index 42106464fc..ae674a0348 100644 --- a/fearless/Common/Helpers/ChainAssetsFetching.swift +++ b/fearless/Common/Helpers/ChainAssetsFetching.swift @@ -91,7 +91,7 @@ final class ChainAssetsFetching: ChainAssetFetchingProtocol { sortDescriptors: [SortDescriptor], completionBlock: @escaping (Result<[ChainAsset], Error>?) -> Void ) { - let operation = chainRepository.fetchAllOperation(with: .none) + let operation = chainRepository.fetchAllOperation(with: RepositoryFetchOptions()) operation.completionBlock = { [weak self] in guard let strongSelf = self else { return diff --git a/fearless/Modules/NewWallet/ChainAssetList/ChainAssetListAssembly.swift b/fearless/Modules/NewWallet/ChainAssetList/ChainAssetListAssembly.swift index 33c861ce0d..7daabe940b 100644 --- a/fearless/Modules/NewWallet/ChainAssetList/ChainAssetListAssembly.swift +++ b/fearless/Modules/NewWallet/ChainAssetList/ChainAssetListAssembly.swift @@ -33,6 +33,13 @@ final class ChainAssetListAssembly { let dependencyContainer = ChainAssetListDependencyContainer() + let router = ChainAssetListRouter() + + let accountInfoSubscriptionAdapter = AccountInfoSubscriptionAdapter( + walletLocalSubscriptionFactory: WalletLocalSubscriptionFactory.shared, + selectedMetaAccount: wallet + ) + let interactor = ChainAssetListInteractor( wallet: wallet, priceLocalSubscriptionFactory: priceLocalSubscriptionFactory, @@ -43,7 +50,7 @@ final class ChainAssetListAssembly { accountInfoFetching: accountInfoFetching, dependencyContainer: dependencyContainer ) - let router = ChainAssetListRouter() + let viewModelFactory = ChainAssetListViewModelFactory( assetBalanceFormatterFactory: AssetBalanceFormatterFactory(), settings: SettingsManager.shared diff --git a/fearless/Modules/NewWallet/ChainAssetList/ChainAssetListInteractor.swift b/fearless/Modules/NewWallet/ChainAssetList/ChainAssetListInteractor.swift index b2b555f2fc..77aee18615 100644 --- a/fearless/Modules/NewWallet/ChainAssetList/ChainAssetListInteractor.swift +++ b/fearless/Modules/NewWallet/ChainAssetList/ChainAssetListInteractor.swift @@ -2,6 +2,7 @@ import UIKit import RobinHood import SoraKeystore import SSFModels +import SCard final class ChainAssetListInteractor { // MARK: - Private properties @@ -173,6 +174,64 @@ extension ChainAssetListInteractor: ChainAssetListInteractorInput { let updatedAccount = wallet.replacingAssetsFilterOptions(filterOptions) save(updatedAccount) } + + func initSoraCard(completionBlock: @escaping (Result?) -> Void) { + if let soraCard = SCard.shared { + completionBlock(.success(soraCard)) + } + let dependencies = dependencyContainer.buildDependencies(for: wallet) +// let chainAssetFetching = dependencies.chainAssetFetching +// let accountInfoSubscriptionAdapter = dependencies.accountInfoSubscriptionAdapter +// chainAssetFetching.fetch(filters: [.assetName("xor")], sortDescriptors: []) { [weak self] result in +// guard let strongSelf = self else { return } +// switch result { +// case let .success(chainAssets): +// if let soraChainAsset = chainAssets.first(where: { chainAsset in +// chainAsset.chain.chainId == Chain.soraMain.genesisHash +// }) { +// let soraCardInitializer = SoraCardInitializer( +// wallet: strongSelf.wallet, +// soraChainAsset: soraChainAsset, +// accountInfoSubscriptionAdapter: accountInfoSubscriptionAdapter +// ) +// let soraCard = soraCardInitializer.initSoraCard() +// completionBlock(soraCard) +// } +// default: +// completionBlock(nil) +// } +// } + let accountInfoSubscriptionAdapter = dependencies.accountInfoSubscriptionAdapter + let chainRepository = ChainRepositoryFactory().createRepository( + sortDescriptors: [NSSortDescriptor.chainsByAddressPrefix] + ) + let operation = chainRepository.fetchAllOperation(with: RepositoryFetchOptions()) + operation.completionBlock = { [weak self] in + guard let strongSelf = self else { + return + } + switch operation.result { + case let .success(chains): + let soraChain = chains.first(where: { $0.chainId == Chain.soraMain.genesisHash }) + if let soraChainAsset = soraChain?.utilityChainAssets().first { + let soraCardInitializer = SoraCardInitializer( + wallet: strongSelf.wallet, + soraChainAsset: soraChainAsset, + accountInfoSubscriptionAdapter: accountInfoSubscriptionAdapter + ) + let soraCard = soraCardInitializer.initSoraCard() + completionBlock(.success(soraCard)) + } else { + completionBlock(.none) + } + case let .failure(error): + completionBlock(.failure(error)) + case .none: + completionBlock(.none) + } + } + operationQueue.addOperation(operation) + } } private extension ChainAssetListInteractor { diff --git a/fearless/Modules/NewWallet/ChainAssetList/ChainAssetListPresenter.swift b/fearless/Modules/NewWallet/ChainAssetList/ChainAssetListPresenter.swift index 753e557297..99d77c2790 100644 --- a/fearless/Modules/NewWallet/ChainAssetList/ChainAssetListPresenter.swift +++ b/fearless/Modules/NewWallet/ChainAssetList/ChainAssetListPresenter.swift @@ -1,6 +1,7 @@ import Foundation import SoraFoundation import SSFModels +import SCard enum AssetListDisplayType { case chain @@ -57,6 +58,37 @@ final class ChainAssetListPresenter { let accountInfosCopy = self.accountInfos let prices = self.prices let chainsWithMissingAccounts = self.chainsWithMissingAccounts + let onClose: () -> Void = { [weak self] in + self?.closeSoraCard() + } + let onCard: () -> Void = { [weak self] in + self?.router.startSoraCard(from: self?.view) + } + + guard let soraCard = SCard.shared else { + interactor.initSoraCard { result in + var soraCardService: SCard? + if case let .success(soraCard) = result { + soraCardService = soraCard + } + let viewModel = self.viewModelFactory.buildViewModel( + wallet: self.wallet, + chainAssets: chainAssets, + locale: self.selectedLocale, + accountInfos: accountInfosCopy, + prices: prices, + chainsWithMissingAccounts: chainsWithMissingAccounts, + activeFilters: self.activeFilters, + soraCardService: soraCardService, + onClose: onClose, + onCard: onCard + ) + DispatchQueue.main.async { + self.view?.didReceive(viewModel: viewModel) + } + } + return + } let viewModel = self.viewModelFactory.buildViewModel( wallet: self.wallet, @@ -65,7 +97,10 @@ final class ChainAssetListPresenter { accountInfos: accountInfosCopy, prices: prices, chainsWithMissingAccounts: chainsWithMissingAccounts, - activeFilters: self.activeFilters + activeFilters: self.activeFilters, + soraCardService: soraCard, + onClose: onClose, + onCard: onCard ) DispatchQueue.main.async { @@ -74,6 +109,11 @@ final class ChainAssetListPresenter { } } + private func closeSoraCard() { + SCard.shared?.isSCBannerHidden = true + view?.closeSoraCard() + } + private func showMissingAccountOptions(chain: ChainModel) { let unused = (wallet.unusedChainIds ?? []).contains(chain.chainId) let options: [MissingAccountOption?] = [.create, .import, unused ? nil : .skip] diff --git a/fearless/Modules/NewWallet/ChainAssetList/ChainAssetListProtocols.swift b/fearless/Modules/NewWallet/ChainAssetList/ChainAssetListProtocols.swift index 62f5d93148..b4fc8b42b5 100644 --- a/fearless/Modules/NewWallet/ChainAssetList/ChainAssetListProtocols.swift +++ b/fearless/Modules/NewWallet/ChainAssetList/ChainAssetListProtocols.swift @@ -1,11 +1,13 @@ import Foundation import SSFModels +import SCard typealias ChainAssetListModuleCreationResult = (view: ChainAssetListViewInput, input: ChainAssetListModuleInput) protocol ChainAssetListViewInput: ControllerBackedProtocol { func didReceive(viewModel: ChainAssetListViewModel) func reloadBanners() + func closeSoraCard() } protocol ChainAssetListViewOutput: AnyObject { @@ -16,6 +18,7 @@ protocol ChainAssetListViewOutput: AnyObject { } protocol ChainAssetListInteractorInput: AnyObject { + func initSoraCard(completionBlock: @escaping (Result?) -> Void) func setup(with output: ChainAssetListInteractorOutput) func updateChainAssets( using filters: [ChainAssetsFetching.Filter], @@ -71,6 +74,14 @@ protocol ChainAssetListRouterInput: uniqueChainModel: UniqueChainModel, from view: ControllerBackedProtocol? ) + func showPolkaswap( + controller: UIViewController, + from view: ControllerBackedProtocol? + ) + + func startSoraCard( + from view: ControllerBackedProtocol? + ) } protocol ChainAssetListModuleInput: AnyObject { diff --git a/fearless/Modules/NewWallet/ChainAssetList/ChainAssetListRouter.swift b/fearless/Modules/NewWallet/ChainAssetList/ChainAssetListRouter.swift index 60e4133faf..f5223cf486 100644 --- a/fearless/Modules/NewWallet/ChainAssetList/ChainAssetListRouter.swift +++ b/fearless/Modules/NewWallet/ChainAssetList/ChainAssetListRouter.swift @@ -1,5 +1,6 @@ import Foundation import SSFModels +import SCard final class ChainAssetListRouter: ChainAssetListRouterInput { func showChainAccount( @@ -103,4 +104,18 @@ final class ChainAssetListRouter: ChainAssetListRouterInput { view?.controller.present(navigationController, animated: true) } + + func showPolkaswap(controller: UIViewController, from view: ControllerBackedProtocol?) { + let navigationController = FearlessNavigationController(rootViewController: controller) + + view?.controller.navigationController?.present( + navigationController, + animated: true + ) + } + + func startSoraCard(from view: ControllerBackedProtocol?) { + guard let vc = view?.controller else { return } + SCard.shared?.start(in: vc) + } } diff --git a/fearless/Modules/NewWallet/ChainAssetList/ChainAssetListViewController.swift b/fearless/Modules/NewWallet/ChainAssetList/ChainAssetListViewController.swift index 5233ebca8e..5745a1b2f8 100644 --- a/fearless/Modules/NewWallet/ChainAssetList/ChainAssetListViewController.swift +++ b/fearless/Modules/NewWallet/ChainAssetList/ChainAssetListViewController.swift @@ -2,6 +2,7 @@ import UIKit import SoraFoundation import SnapKit import SoraUI +import SCard enum HiddenSectionState { case hidden @@ -87,6 +88,7 @@ final class ChainAssetListViewController: private extension ChainAssetListViewController { func configureTableView() { + rootView.tableView.registerClassForCell(SCCardCell.self) rootView.tableView.registerClassForCell(ChainAccountBalanceTableCell.self) rootView.tableView.delegate = self rootView.tableView.dataSource = self @@ -132,6 +134,10 @@ private extension ChainAssetListViewController { // MARK: - ChainAssetListViewInput extension ChainAssetListViewController: ChainAssetListViewInput { + func closeSoraCard() { + rootView.tableView.reloadData() + } + func reloadBanners() { guard viewModel != nil else { return diff --git a/fearless/Modules/NewWallet/ChainAssetList/ChainAssetListViewLayout.swift b/fearless/Modules/NewWallet/ChainAssetList/ChainAssetListViewLayout.swift index 767f6b5cc2..0d3014cc83 100644 --- a/fearless/Modules/NewWallet/ChainAssetList/ChainAssetListViewLayout.swift +++ b/fearless/Modules/NewWallet/ChainAssetList/ChainAssetListViewLayout.swift @@ -51,6 +51,13 @@ final class ChainAssetListViewLayout: UIView { } } + func addSoraCard(view: UIView) { + headerViewContainer.addArrangedSubview(view) + view.snp.makeConstraints { make in + make.leading.trailing.equalToSuperview() + } + } + private func setupLayout() { tableView.tableHeaderView = headerViewContainer headerViewContainer.snp.makeConstraints { make in diff --git a/fearless/Modules/NewWallet/ChainAssetList/ViewModel/ChainAssetListViewModel.swift b/fearless/Modules/NewWallet/ChainAssetList/ViewModel/ChainAssetListViewModel.swift index 0abdbdcb8c..508b9b10ec 100644 --- a/fearless/Modules/NewWallet/ChainAssetList/ViewModel/ChainAssetListViewModel.swift +++ b/fearless/Modules/NewWallet/ChainAssetList/ViewModel/ChainAssetListViewModel.swift @@ -1,3 +1,5 @@ +import SCard + enum ChainAssetListTableSection: Int { case active case hidden @@ -9,4 +11,5 @@ struct ChainAssetListViewModel { let isColdBoot: Bool let hiddenSectionState: HiddenSectionState let emptyStateIsActive: Bool + let soraCardItem: SCCardItem? } diff --git a/fearless/Modules/NewWallet/ChainAssetList/ViewModel/ChainAssetListViewModelFactory.swift b/fearless/Modules/NewWallet/ChainAssetList/ViewModel/ChainAssetListViewModelFactory.swift index d947a507b4..d94251eb99 100644 --- a/fearless/Modules/NewWallet/ChainAssetList/ViewModel/ChainAssetListViewModelFactory.swift +++ b/fearless/Modules/NewWallet/ChainAssetList/ViewModel/ChainAssetListViewModelFactory.swift @@ -3,6 +3,8 @@ import SoraFoundation import SoraKeystore import BigInt import SSFModels +import SCard +import SoraUIKit // swiftlint:disable function_parameter_count function_body_length protocol ChainAssetListViewModelFactoryProtocol { @@ -13,7 +15,10 @@ protocol ChainAssetListViewModelFactoryProtocol { accountInfos: [ChainAssetKey: AccountInfo?], prices: PriceDataUpdated, chainsWithMissingAccounts: [ChainModel.Id], - activeFilters: [ChainAssetsFetching.Filter] + activeFilters: [ChainAssetsFetching.Filter], + soraCardService: SCard?, + onClose: (() -> Void)?, + onCard: (() -> Void)? ) -> ChainAssetListViewModel } @@ -43,8 +48,20 @@ final class ChainAssetListViewModelFactory: ChainAssetListViewModelFactoryProtoc accountInfos: [ChainAssetKey: AccountInfo?], prices: PriceDataUpdated, chainsWithMissingAccounts: [ChainModel.Id], - activeFilters: [ChainAssetsFetching.Filter] + activeFilters: [ChainAssetsFetching.Filter], + soraCardService: SCard?, + onClose: (() -> Void)?, + onCard: (() -> Void)? ) -> ChainAssetListViewModel { + var soraCardItem: SCCardItem? + if let service = soraCardService { + soraCardItem = SCCardItem( + service: service, + onClose: onClose, + onCard: onCard + ) + } + var fiatBalanceByChainAsset: [ChainAsset: Decimal] = [:] chainAssets.forEach { chainAsset in @@ -150,7 +167,8 @@ final class ChainAssetListViewModelFactory: ChainAssetListViewModelFactoryProtoc ], isColdBoot: isColdBoot, hiddenSectionState: hiddenSectionState, - emptyStateIsActive: emptyStateIsActive + emptyStateIsActive: emptyStateIsActive, + soraCardItem: soraCardItem ) } } From 6d55e11da6564a031aa9db3bfa97e08427909818 Mon Sep 17 00:00:00 2001 From: Denis Lebedko Date: Mon, 4 Sep 2023 16:11:34 +0700 Subject: [PATCH 3/5] update pods, modules --- Podfile | 6 +- Podfile.lock | 56 +++++++-------- .../ChainAssetListInteractor.swift | 68 ++++++------------- .../ChainAssetListPresenter.swift | 4 +- .../ChainAssetListViewController.swift | 3 + .../ChainAssetListViewLayout.swift | 15 ++-- .../Modules/Profile/ProfilePresenter.swift | 3 + .../Modules/Profile/ProfileProtocol.swift | 1 + .../Modules/Profile/ProfileWireframe.swift | 6 ++ .../ViewModel/ProfileViewModelFactory.swift | 16 +++++ 10 files changed, 93 insertions(+), 85 deletions(-) diff --git a/Podfile b/Podfile index 0016310310..dacadc3509 100644 --- a/Podfile +++ b/Podfile @@ -28,7 +28,7 @@ abstract_target 'fearlessAll' do pod 'XNetworking', :podspec => 'https://raw.githubusercontent.com/soramitsu/x-networking/0.0.37/AppCommonNetworking/XNetworking/XNetworking.podspec' pod 'SoraUIKit', :git => 'https://github.com/soramitsu/ios-ui.git', :tag => '1.0.2' pod 'IdensicMobileSDK', :http => 'https://github.com/PayWings/PayWingsOnboardingKycSDK-iOS-IdensicMobile/archive/v2.2.1.tar.gz' - pod 'SCard', :git => 'https://github.com/sora-xor/sora-card-ios', :branch => 'release/1.0.0' # :tag => '1.0.0' # :path => '../sora-card-ios' + pod 'SCard', :git => 'https://github.com/sora-xor/sora-card-ios', :branch => 'release/1.1.0' def pods_with_configurations if %r{^true$}i.match ENV['F_DEV'] @@ -43,10 +43,10 @@ abstract_target 'fearlessAll' do pod 'SSFLogger' pod 'SSFRuntimeCodingService' pod 'SSFStorageQueryKit' - pod 'SSFChainConnection' + pod 'SSFChainConnection', '0.1.4' pod 'SSFNetwork' pod 'SSFUtils' - pod 'SSFChainRegistry' + pod 'SSFChainRegistry', '0.1.4' pod 'SSFHelpers', '0.1.2' pod 'SSFCloudStorage' end diff --git a/Podfile.lock b/Podfile.lock index 50bd665f94..171cf6da1d 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -10,9 +10,9 @@ PODS: - Charts/Core (= 4.1.0) - Charts/Core (4.1.0): - SwiftAlgorithms (~> 1.0) - - CocoaLumberjack (3.8.0): - - CocoaLumberjack/Core (= 3.8.0) - - CocoaLumberjack/Core (3.8.0) + - CocoaLumberjack (3.8.1): + - CocoaLumberjack/Core (= 3.8.1) + - CocoaLumberjack/Core (3.8.1) - CommonWallet/Core (1.16.0): - RobinHood (~> 2.6.1) - SoraFoundation/DateProcessing (~> 1.0.0) @@ -72,7 +72,7 @@ PODS: - IrohaCrypto/blake2 - IrohaCrypto/Common - keccak.c (0.1.3) - - Kingfisher (7.7.0) + - Kingfisher (7.9.1) - PayWingsOAuthSDK (1.2.2) - PayWingsOnboardingKYC (5.1.13): - VideoID (= 7.1.31) @@ -81,7 +81,7 @@ PODS: - R.swift.Library (5.3.0) - ReachabilitySwift (5.0.0) - RobinHood (2.6.7) - - SCard (1.0.0): + - SCard (1.1.0): - IdensicMobileSDK - PayWingsOAuthSDK (= 1.2.2) - PayWingsOnboardingKYC (= 5.1.13) @@ -146,9 +146,9 @@ PODS: - Sourcery (1.9.2): - Sourcery/CLI-Only (= 1.9.2) - Sourcery/CLI-Only (1.9.2) - - SSFChainConnection (0.1.0): + - SSFChainConnection (0.1.4): - SSFUtils - - SSFChainRegistry (0.1.0): + - SSFChainRegistry (0.1.4): - RobinHood - SSFChainConnection - SSFLogger @@ -156,14 +156,14 @@ PODS: - SSFNetwork - SSFRuntimeCodingService - SSFUtils - - SSFCloudStorage (0.1.6): + - SSFCloudStorage (0.1.12): - GoogleAPIClientForREST/Drive (~> 1.2.1) - GoogleSignIn (~> 7.0.0) - IrohaCrypto/Scrypt - SSFModels - SSFUtils - TweetNacl (~> 1.0.0) - - SSFCrypto (0.1.0): + - SSFCrypto (0.1.11): - IrohaCrypto/ed25519 - IrohaCrypto/Scrypt - IrohaCrypto/secp256k1 @@ -214,7 +214,7 @@ PODS: - SSFCrypto - SSFRuntimeCodingService - SSFUtils - - SSFUtils (0.1.1): + - SSFUtils (0.1.14): - BigInt (~> 5.0) - IrohaCrypto/ed25519 - IrohaCrypto/Scrypt @@ -227,7 +227,7 @@ PODS: - Starscream - TweetNacl (~> 1.0.0) - xxHash-Swift (~> 1.0.0) - - SSFXCM (0.1.2): + - SSFXCM (0.1.13): - IrohaCrypto - RobinHood - SSFChainConnection @@ -245,7 +245,7 @@ PODS: - CocoaLumberjack (~> 3.0) - SwiftAlgorithms (1.0.0) - SwiftFormat/CLI (0.47.13) - - SwiftLint (0.52.2) + - SwiftLint (0.52.4) - SwiftyBeaver (1.9.5) - TweetNacl (1.0.2) - VideoID (7.1.31): @@ -265,15 +265,15 @@ DEPENDENCIES: - R.swift (= 6.1.0) - ReachabilitySwift - RobinHood (~> 2.6.7) - - SCard (from `https://github.com/sora-xor/sora-card-ios`, branch `release/1.0.0`) + - SCard (from `https://github.com/sora-xor/sora-card-ios`, branch `release/1.1.0`) - SnapKit (~> 5.0.0) - SoraFoundation (~> 1.0.0) - SoraKeystore (from `https://github.com/soramitsu/keystore-iOS.git`, tag `1.0.1`) - SoraUI (~> 1.10.3) - SoraUIKit (from `https://github.com/soramitsu/ios-ui.git`, tag `1.0.2`) - Sourcery (~> 1.4) - - SSFChainConnection - - SSFChainRegistry + - SSFChainConnection (= 0.1.4) + - SSFChainRegistry (= 0.1.4) - SSFCloudStorage - SSFCrypto - SSFEraKit @@ -352,7 +352,7 @@ EXTERNAL SOURCES: IdensicMobileSDK: :http: https://github.com/PayWings/PayWingsOnboardingKycSDK-iOS-IdensicMobile/archive/v2.2.1.tar.gz SCard: - :branch: release/1.0.0 + :branch: release/1.1.0 :git: https://github.com/sora-xor/sora-card-ios SoraKeystore: :git: https://github.com/soramitsu/keystore-iOS.git @@ -370,7 +370,7 @@ CHECKOUT OPTIONS: IdensicMobileSDK: :http: https://github.com/PayWings/PayWingsOnboardingKycSDK-iOS-IdensicMobile/archive/v2.2.1.tar.gz SCard: - :commit: 311939bc40aff65371f9494cbd1a5a8c88e0bc49 + :commit: 82b4717d48a37006e066089d006b0efad4e9886e :git: https://github.com/sora-xor/sora-card-ios SoraKeystore: :git: https://github.com/soramitsu/keystore-iOS.git @@ -386,7 +386,7 @@ SPEC CHECKSUMS: AppAuth: 3bb1d1cd9340bd09f5ed189fb00b1cc28e1e8570 BigInt: f668a80089607f521586bbe29513d708491ef2f7 Charts: ce0768268078eee0336f122c3c4ca248e4e204c5 - CocoaLumberjack: 78abfb691154e2a9df8ded4350d504ee19d90732 + CocoaLumberjack: 5c7e64cdb877770859bddec4d3d5a0d7c9299df9 CommonWallet: 3c67d5fd85593a20f6b55777c2660ff886fc4148 Cuckoo: 930598bd4ae95860c658b3eea30903d946ebef36 eIDRTC: debca63e4c367be509c77292df65b9527d695f10 @@ -398,14 +398,14 @@ SPEC CHECKSUMS: IdensicMobileSDK: 724b75dbb204a9c1ae1dafe5c1366b8aeb00b6cf IrohaCrypto: eb3772088068d8938198205b62b0a9dc5b8ce005 keccak.c: 859583afdaccb4e4fcc0f0096064d101580313f4 - Kingfisher: f043ac666dfc96c1f37604f93effb45a7ee3a3e1 + Kingfisher: 1d14e9f59cbe19389f591c929000332bf70efd32 PayWingsOAuthSDK: 97c104c6efa982313fd515c22339279f24ac3461 PayWingsOnboardingKYC: abff20d772e9b87e9315b4999feb7401d6557eee R.swift: ec98ff71c4ab2f6fd01dd077e5afd15e63a4834c R.swift.Library: 0fc583cb55a99e28901299cc451614cad1161962 ReachabilitySwift: 985039c6f7b23a1da463388634119492ff86c825 RobinHood: 40edb5db53d5763433af25f95d81f7860d7acdc6 - SCard: 75b8f01b87f7a52e581e9c0ebb5d65fedbefddd0 + SCard: 0f3a1fe782ac1624c92f57df4c029e35c3f8c15b scrypt.c: b42ae06183251329d2b2c620c226fb541a4a3592 secp256k1.c: db47b726585d80f027423682eb369729e61b3b20 SnapKit: 97b92857e3df3a0c71833cce143274bf6ef8e5eb @@ -414,10 +414,10 @@ SPEC CHECKSUMS: SoraUI: 1ec71151eb962591eeb898bcdd98bded59745f2d SoraUIKit: 258aa43f318cb306b29cdadb52139d794c184333 Sourcery: 179539341c2261068528cd15a31837b7238fd901 - SSFChainConnection: a232b35cc083e9e9e79ff6ed228812cddd11ace6 - SSFChainRegistry: bb26ac38e4c43aeaf29f1a959603aa5fd6889d7e - SSFCloudStorage: 5124491f345bdd304b4d07c6d2368dfde59bc61d - SSFCrypto: 1d82ecd49dc44d47e155bdecd7b873348f5bdd16 + SSFChainConnection: 760f0bbe0d711cc0f184b951dea9e840a2962346 + SSFChainRegistry: adfcfa6f8e7dae4730e258989c2a58ee674bf1e1 + SSFCloudStorage: 5e7dc925f82ad67d5b44a34a825f30f62dfbd190 + SSFCrypto: 0d1b79e1d253055189ec42b6155d045f464ab993 SSFEraKit: a6f2a8bdefcdfa3ad8ff8f48b242000ea50744cd SSFExtrinsicKit: f5ab32700622894d2e7a5fca254a3f659d3a6a9f SSFHelpers: 93becab69ebcef78bceee530fd2d57939d21052c @@ -427,19 +427,19 @@ SPEC CHECKSUMS: SSFRuntimeCodingService: d67154d18789604a448b4e9f1c261ade291629e8 SSFSigner: 2ff97e574d16a5e0d87afc6f50177c5ad14c38bf SSFStorageQueryKit: 3063fdf0a84c9b7c1c2a2a08b862162bd0d38694 - SSFUtils: f6422d909cb57a85cd5784b3f399aead69b26a6b - SSFXCM: 59cb429a5c20c4f34f6c383e36ab8644922703b0 + SSFUtils: 3254af5db8930b8c4bdaa94d9e3a51596afafc79 + SSFXCM: 2e8458396a85185631b8003619b9873583b67e10 Starscream: b676ee89781677a2d8d36029a78c970710e2d3eb SVGKit: 1ad7513f8c74d9652f94ed64ddecda1a23864dea SwiftAlgorithms: 38dda4731d19027fdeee1125f973111bf3386b53 SwiftFormat: 73573b89257437c550b03d934889725fbf8f75e5 - SwiftLint: 1ac76dac888ca05cb0cf24d0c85887ec1209961d + SwiftLint: 1cc5cd61ba9bacb2194e340aeb47a2a37fda00b3 SwiftyBeaver: 84069991dd5dca07d7069100985badaca7f0ce82 TweetNacl: 3abf4d1d2082b0114e7a67410e300892448951e6 VideoID: d48d4f30f79f12229421a09e65692561960dc5b5 XNetworking: 516d982bd74ff208222381d27e07052a5d897aaf xxHash-Swift: 30bd6a7507b3b7348a277c49b1cb6346c2905ec7 -PODFILE CHECKSUM: d4d9fa802da1a5ab081efd0a15bbef52930f4958 +PODFILE CHECKSUM: 03a8123d6101eb62952610b9d962188917fe9a09 COCOAPODS: 1.11.3 diff --git a/fearless/Modules/NewWallet/ChainAssetList/ChainAssetListInteractor.swift b/fearless/Modules/NewWallet/ChainAssetList/ChainAssetListInteractor.swift index 77aee18615..b744efbefe 100644 --- a/fearless/Modules/NewWallet/ChainAssetList/ChainAssetListInteractor.swift +++ b/fearless/Modules/NewWallet/ChainAssetList/ChainAssetListInteractor.swift @@ -180,57 +180,31 @@ extension ChainAssetListInteractor: ChainAssetListInteractorInput { completionBlock(.success(soraCard)) } let dependencies = dependencyContainer.buildDependencies(for: wallet) -// let chainAssetFetching = dependencies.chainAssetFetching -// let accountInfoSubscriptionAdapter = dependencies.accountInfoSubscriptionAdapter -// chainAssetFetching.fetch(filters: [.assetName("xor")], sortDescriptors: []) { [weak self] result in -// guard let strongSelf = self else { return } -// switch result { -// case let .success(chainAssets): -// if let soraChainAsset = chainAssets.first(where: { chainAsset in -// chainAsset.chain.chainId == Chain.soraMain.genesisHash -// }) { -// let soraCardInitializer = SoraCardInitializer( -// wallet: strongSelf.wallet, -// soraChainAsset: soraChainAsset, -// accountInfoSubscriptionAdapter: accountInfoSubscriptionAdapter -// ) -// let soraCard = soraCardInitializer.initSoraCard() -// completionBlock(soraCard) -// } -// default: -// completionBlock(nil) -// } -// } + let chainAssetFetching = dependencies.chainAssetFetching let accountInfoSubscriptionAdapter = dependencies.accountInfoSubscriptionAdapter - let chainRepository = ChainRepositoryFactory().createRepository( - sortDescriptors: [NSSortDescriptor.chainsByAddressPrefix] - ) - let operation = chainRepository.fetchAllOperation(with: RepositoryFetchOptions()) - operation.completionBlock = { [weak self] in - guard let strongSelf = self else { - return - } - switch operation.result { - case let .success(chains): - let soraChain = chains.first(where: { $0.chainId == Chain.soraMain.genesisHash }) - if let soraChainAsset = soraChain?.utilityChainAssets().first { - let soraCardInitializer = SoraCardInitializer( - wallet: strongSelf.wallet, - soraChainAsset: soraChainAsset, - accountInfoSubscriptionAdapter: accountInfoSubscriptionAdapter - ) - let soraCard = soraCardInitializer.initSoraCard() - completionBlock(.success(soraCard)) - } else { - completionBlock(.none) + chainAssetFetching.fetch(filters: [.assetName("xor")], sortDescriptors: []) { [weak self] result in + guard let strongSelf = self else { return } + switch result { + case let .success(chainAssets): + if let soraChainAsset = chainAssets.first(where: { chainAsset in + chainAsset.chain.chainId == Chain.soraMain.genesisHash + }) { + DispatchQueue.main.async { + let soraCardInitializer = SoraCardInitializer( + wallet: strongSelf.wallet, + soraChainAsset: soraChainAsset, + accountInfoSubscriptionAdapter: accountInfoSubscriptionAdapter + ) + let soraCard = soraCardInitializer.initSoraCard() + completionBlock(.success(soraCard)) + } + } + default: + DispatchQueue.main.async { + completionBlock(nil) } - case let .failure(error): - completionBlock(.failure(error)) - case .none: - completionBlock(.none) } } - operationQueue.addOperation(operation) } } diff --git a/fearless/Modules/NewWallet/ChainAssetList/ChainAssetListPresenter.swift b/fearless/Modules/NewWallet/ChainAssetList/ChainAssetListPresenter.swift index 99d77c2790..c1b1e67e7b 100644 --- a/fearless/Modules/NewWallet/ChainAssetList/ChainAssetListPresenter.swift +++ b/fearless/Modules/NewWallet/ChainAssetList/ChainAssetListPresenter.swift @@ -83,9 +83,7 @@ final class ChainAssetListPresenter { onClose: onClose, onCard: onCard ) - DispatchQueue.main.async { - self.view?.didReceive(viewModel: viewModel) - } + self.view?.didReceive(viewModel: viewModel) } return } diff --git a/fearless/Modules/NewWallet/ChainAssetList/ChainAssetListViewController.swift b/fearless/Modules/NewWallet/ChainAssetList/ChainAssetListViewController.swift index 5745a1b2f8..9da8c49ea7 100644 --- a/fearless/Modules/NewWallet/ChainAssetList/ChainAssetListViewController.swift +++ b/fearless/Modules/NewWallet/ChainAssetList/ChainAssetListViewController.swift @@ -152,6 +152,9 @@ extension ChainAssetListViewController: ChainAssetListViewInput { self.viewModel = viewModel hiddenSectionState = viewModel.hiddenSectionState + if let soraItem = viewModel.soraCardItem { + rootView.bindSoraCard(item: soraItem) + } if isInitialReload { rootView.tableView.reloadData() diff --git a/fearless/Modules/NewWallet/ChainAssetList/ChainAssetListViewLayout.swift b/fearless/Modules/NewWallet/ChainAssetList/ChainAssetListViewLayout.swift index 0d3014cc83..d32d84c96e 100644 --- a/fearless/Modules/NewWallet/ChainAssetList/ChainAssetListViewLayout.swift +++ b/fearless/Modules/NewWallet/ChainAssetList/ChainAssetListViewLayout.swift @@ -1,4 +1,5 @@ import UIKit +import SCard import SoraUI import SnapKit @@ -20,6 +21,7 @@ final class ChainAssetListViewLayout: UIView { var keyboardAdoptableConstraint: Constraint? weak var bannersView: UIView? + private var soraCardCell: SCCardCell? var headerViewContainer: UIStackView = { UIFactory.default.createVerticalStackView(spacing: UIConstants.bigOffset) @@ -51,10 +53,15 @@ final class ChainAssetListViewLayout: UIView { } } - func addSoraCard(view: UIView) { - headerViewContainer.addArrangedSubview(view) - view.snp.makeConstraints { make in - make.leading.trailing.equalToSuperview() + func bindSoraCard(item: SCCardItem) { + let cell = SCCardCell() + cell.set(item: item, context: nil) + if soraCardCell == nil { + soraCardCell = cell + headerViewContainer.addArrangedSubview(cell.contentView) + cell.contentView.snp.makeConstraints { make in + make.leading.trailing.equalToSuperview() + } } } diff --git a/fearless/Modules/Profile/ProfilePresenter.swift b/fearless/Modules/Profile/ProfilePresenter.swift index 6ee793b79e..fcb51e04d7 100644 --- a/fearless/Modules/Profile/ProfilePresenter.swift +++ b/fearless/Modules/Profile/ProfilePresenter.swift @@ -1,6 +1,7 @@ import Foundation import SoraFoundation import SoraKeystore +import SCard final class ProfilePresenter { private weak var view: ProfileViewProtocol? @@ -76,6 +77,8 @@ extension ProfilePresenter: ProfilePresenterProtocol { switch option { case .accountList: wireframe.showAccountSelection(from: view, moduleOutput: self) + case .soraCard: + wireframe.startSoraCard(from: view) case .changePincode: wireframe.showPincodeChange(from: view) case .language: diff --git a/fearless/Modules/Profile/ProfileProtocol.swift b/fearless/Modules/Profile/ProfileProtocol.swift index c9668b678b..05e501c2f3 100644 --- a/fearless/Modules/Profile/ProfileProtocol.swift +++ b/fearless/Modules/Profile/ProfileProtocol.swift @@ -53,6 +53,7 @@ protocol ProfileWireframeProtocol: ErrorPresentable, func showSelectCurrency(from view: ProfileViewProtocol?, with: MetaAccountModel) func close(view: ControllerBackedProtocol?) func showPolkaswapDisclaimer(from view: ControllerBackedProtocol?) + func startSoraCard(from view: ControllerBackedProtocol?) } protocol ProfileViewFactoryProtocol: AnyObject { diff --git a/fearless/Modules/Profile/ProfileWireframe.swift b/fearless/Modules/Profile/ProfileWireframe.swift index 16dc8e6b51..1a19862ce5 100644 --- a/fearless/Modules/Profile/ProfileWireframe.swift +++ b/fearless/Modules/Profile/ProfileWireframe.swift @@ -1,5 +1,6 @@ import Foundation import UIKit +import SCard final class ProfileWireframe: ProfileWireframeProtocol, AuthorizationPresentable { lazy var rootAnimator: RootControllerAnimationCoordinatorProtocol = RootControllerAnimationCoordinator() @@ -118,4 +119,9 @@ final class ProfileWireframe: ProfileWireframeProtocol, AuthorizationPresentable animated: true ) } + + func startSoraCard(from view: ControllerBackedProtocol?) { + guard let vc = view?.controller else { return } + SCard.shared?.start(in: vc) + } } diff --git a/fearless/Modules/Profile/ViewModel/ProfileViewModelFactory.swift b/fearless/Modules/Profile/ViewModel/ProfileViewModelFactory.swift index ec0f620502..7d11c98a09 100644 --- a/fearless/Modules/Profile/ViewModel/ProfileViewModelFactory.swift +++ b/fearless/Modules/Profile/ViewModel/ProfileViewModelFactory.swift @@ -18,6 +18,7 @@ protocol ProfileViewModelFactoryProtocol: AnyObject { enum ProfileOption: UInt, CaseIterable { case accountList + case soraCard case currency case language case polkaswapDisclaimer @@ -127,6 +128,8 @@ final class ProfileViewModelFactory: ProfileViewModelFactoryProtocol { for: locale, missingEthAccount: missingAccountIssue.isNotEmpty ) + case .soraCard: + return createSoraCardViewModel(for: locale) case .changePincode: return createChangePincode(for: locale) case .language: @@ -286,6 +289,19 @@ final class ProfileViewModelFactory: ProfileViewModelFactoryProtocol { return viewModel } + private func createSoraCardViewModel(for locale: Locale) -> ProfileOptionViewModel { + let title = R.string.localizable.profileSoracardTitle(preferredLanguages: locale.rLanguages) + let viewModel = ProfileOptionViewModel( + title: title, + icon: R.image.iconSoraCard()!, + accessoryTitle: nil, + accessoryImage: nil, + accessoryType: .arrow, + option: .soraCard + ) + return viewModel + } + private func getDayChangeAttributedString( currency: Currency, dayChange: Decimal, From a78c5f00fb11d53ecfed7b3c20f4a535636719e4 Mon Sep 17 00:00:00 2001 From: Denis Lebedko Date: Wed, 6 Sep 2023 09:51:04 +0700 Subject: [PATCH 4/5] ui fixes --- .../ChainAssetListViewController.swift | 4 ++-- .../ChainAssetListViewLayout.swift | 17 +++++++++++------ .../ViewModel/ChainAssetListViewModel.swift | 1 + .../ChainAssetListViewModelFactory.swift | 3 ++- 4 files changed, 16 insertions(+), 9 deletions(-) diff --git a/fearless/Modules/NewWallet/ChainAssetList/ChainAssetListViewController.swift b/fearless/Modules/NewWallet/ChainAssetList/ChainAssetListViewController.swift index 9da8c49ea7..6faa8d99a5 100644 --- a/fearless/Modules/NewWallet/ChainAssetList/ChainAssetListViewController.swift +++ b/fearless/Modules/NewWallet/ChainAssetList/ChainAssetListViewController.swift @@ -135,7 +135,7 @@ private extension ChainAssetListViewController { extension ChainAssetListViewController: ChainAssetListViewInput { func closeSoraCard() { - rootView.tableView.reloadData() + rootView.closeSoraCard() } func reloadBanners() { @@ -153,7 +153,7 @@ extension ChainAssetListViewController: ChainAssetListViewInput { self.viewModel = viewModel hiddenSectionState = viewModel.hiddenSectionState if let soraItem = viewModel.soraCardItem { - rootView.bindSoraCard(item: soraItem) + rootView.bindSoraCard(item: soraItem, isHidden: viewModel.soraCardHidden) } if isInitialReload { diff --git a/fearless/Modules/NewWallet/ChainAssetList/ChainAssetListViewLayout.swift b/fearless/Modules/NewWallet/ChainAssetList/ChainAssetListViewLayout.swift index d32d84c96e..2cbccc6888 100644 --- a/fearless/Modules/NewWallet/ChainAssetList/ChainAssetListViewLayout.swift +++ b/fearless/Modules/NewWallet/ChainAssetList/ChainAssetListViewLayout.swift @@ -21,7 +21,7 @@ final class ChainAssetListViewLayout: UIView { var keyboardAdoptableConstraint: Constraint? weak var bannersView: UIView? - private var soraCardCell: SCCardCell? + private var soraCardView: UIView? var headerViewContainer: UIStackView = { UIFactory.default.createVerticalStackView(spacing: UIConstants.bigOffset) @@ -53,18 +53,23 @@ final class ChainAssetListViewLayout: UIView { } } - func bindSoraCard(item: SCCardItem) { + func bindSoraCard(item: SCCardItem, isHidden: Bool) { let cell = SCCardCell() cell.set(item: item, context: nil) - if soraCardCell == nil { - soraCardCell = cell - headerViewContainer.addArrangedSubview(cell.contentView) - cell.contentView.snp.makeConstraints { make in + if soraCardView == nil { + soraCardView = cell.contentView + soraCardView?.isHidden = isHidden + headerViewContainer.addArrangedSubview(soraCardView!) + soraCardView?.snp.makeConstraints { make in make.leading.trailing.equalToSuperview() } } } + func closeSoraCard() { + soraCardView?.isHidden = true + } + private func setupLayout() { tableView.tableHeaderView = headerViewContainer headerViewContainer.snp.makeConstraints { make in diff --git a/fearless/Modules/NewWallet/ChainAssetList/ViewModel/ChainAssetListViewModel.swift b/fearless/Modules/NewWallet/ChainAssetList/ViewModel/ChainAssetListViewModel.swift index 508b9b10ec..755b06b6f6 100644 --- a/fearless/Modules/NewWallet/ChainAssetList/ViewModel/ChainAssetListViewModel.swift +++ b/fearless/Modules/NewWallet/ChainAssetList/ViewModel/ChainAssetListViewModel.swift @@ -12,4 +12,5 @@ struct ChainAssetListViewModel { let hiddenSectionState: HiddenSectionState let emptyStateIsActive: Bool let soraCardItem: SCCardItem? + let soraCardHidden: Bool } diff --git a/fearless/Modules/NewWallet/ChainAssetList/ViewModel/ChainAssetListViewModelFactory.swift b/fearless/Modules/NewWallet/ChainAssetList/ViewModel/ChainAssetListViewModelFactory.swift index d94251eb99..b3ab8258b2 100644 --- a/fearless/Modules/NewWallet/ChainAssetList/ViewModel/ChainAssetListViewModelFactory.swift +++ b/fearless/Modules/NewWallet/ChainAssetList/ViewModel/ChainAssetListViewModelFactory.swift @@ -168,7 +168,8 @@ final class ChainAssetListViewModelFactory: ChainAssetListViewModelFactoryProtoc isColdBoot: isColdBoot, hiddenSectionState: hiddenSectionState, emptyStateIsActive: emptyStateIsActive, - soraCardItem: soraCardItem + soraCardItem: soraCardItem, + soraCardHidden: soraCardService?.isSCBannerHidden ?? true ) } } From 2f283c9100c16c32314d509f40227e426ec8d7df Mon Sep 17 00:00:00 2001 From: Denis Lebedko Date: Wed, 6 Sep 2023 18:47:17 +0700 Subject: [PATCH 5/5] test features for sora card --- fearless.xcodeproj/project.pbxproj | 4 ++++ fearless/Common/EventCenter/EventVisitor.swift | 4 ++++ .../EventCenter/Events/ResetSoraCard.swift | 15 +++++++++++++++ .../ChainAssetListInteractor.swift | 4 ++++ .../ChainAssetList/ChainAssetListPresenter.swift | 12 ++++++------ .../ChainAssetList/ChainAssetListProtocols.swift | 3 ++- .../ChainAssetListViewController.swift | 7 +++++-- .../ChainAssetListViewLayout.swift | 16 ++++++++-------- fearless/Modules/Profile/ProfilePresenter.swift | 3 +++ .../ViewModel/ProfileViewModelFactory.swift | 16 ++++++++++++++++ 10 files changed, 67 insertions(+), 17 deletions(-) create mode 100644 fearless/Common/EventCenter/Events/ResetSoraCard.swift diff --git a/fearless.xcodeproj/project.pbxproj b/fearless.xcodeproj/project.pbxproj index 7f12ec96a8..2b681cee67 100644 --- a/fearless.xcodeproj/project.pbxproj +++ b/fearless.xcodeproj/project.pbxproj @@ -1710,6 +1710,7 @@ C6D7CE0927E83A9F00FFAA6B /* AccountImportViewLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6D7CE0827E83A9F00FFAA6B /* AccountImportViewLayout.swift */; }; C6D7CE0B27E9932D00FFAA6B /* AccountImportViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6D7CE0A27E9932D00FFAA6B /* AccountImportViewController.swift */; }; C6D9B91F2AA826470061C1F7 /* SoraCardInitializer.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6D9B91E2AA826470061C1F7 /* SoraCardInitializer.swift */; }; + C6D9B9212AA8941C0061C1F7 /* ResetSoraCard.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6D9B9202AA8941C0061C1F7 /* ResetSoraCard.swift */; }; C6E5671768DA68535DA5B1C7 /* ControllerAccountConfirmationViewFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = F02DBCA4A63A5E52E3739374 /* ControllerAccountConfirmationViewFactory.swift */; }; C6FB932E27C9334100563E61 /* AvailableExportOptionsProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6FB932D27C9334100563E61 /* AvailableExportOptionsProvider.swift */; }; C77CCA7FF969A2F006A0B6C4 /* WalletChainAccountDashboardProtocols.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8E1C5E0E16867BDA51B6734 /* WalletChainAccountDashboardProtocols.swift */; }; @@ -4410,6 +4411,7 @@ C6D7CE0827E83A9F00FFAA6B /* AccountImportViewLayout.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccountImportViewLayout.swift; sourceTree = ""; }; C6D7CE0A27E9932D00FFAA6B /* AccountImportViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccountImportViewController.swift; sourceTree = ""; }; C6D9B91E2AA826470061C1F7 /* SoraCardInitializer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SoraCardInitializer.swift; sourceTree = ""; }; + C6D9B9202AA8941C0061C1F7 /* ResetSoraCard.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ResetSoraCard.swift; sourceTree = ""; }; C6F8BBBA9EABA266B288333F /* AnalyticsValidatorsViewFactory.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = AnalyticsValidatorsViewFactory.swift; sourceTree = ""; }; C6FB932D27C9334100563E61 /* AvailableExportOptionsProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AvailableExportOptionsProvider.swift; sourceTree = ""; }; C705CA1083C1EE58426D90CD /* AllDoneInteractor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = AllDoneInteractor.swift; sourceTree = ""; }; @@ -9623,6 +9625,7 @@ FA5AE96327B1326400B2564E /* ChainsUpdatedEvent.swift */, 07089AF428B64701001566CA /* ChainReconnectingEvent.swift */, FA37AE4C28603C37001DCA96 /* StakingUpdatedEvent.swift */, + C6D9B9202AA8941C0061C1F7 /* ResetSoraCard.swift */, ); path = Events; sourceTree = ""; @@ -14886,6 +14889,7 @@ 8490145824A9406D008F705E /* LegalData.swift in Sources */, 8472C601265D7A1F00E2481B /* WebSocketProviderSource.swift in Sources */, FA004899282CCFCD0032FF49 /* SelectValidatorsStartParachainViewModelFactory.swift in Sources */, + C6D9B9212AA8941C0061C1F7 /* ResetSoraCard.swift in Sources */, 8425EA9025EA7E5800C307C9 /* ElectedValidatorInfo.swift in Sources */, 846AF8442525BE0100868F37 /* Price.swift in Sources */, 84CD357325264F640081BC0B /* WalletTotalPriceViewModel.swift in Sources */, diff --git a/fearless/Common/EventCenter/EventVisitor.swift b/fearless/Common/EventCenter/EventVisitor.swift index 2a85d2b298..236c346b66 100644 --- a/fearless/Common/EventCenter/EventVisitor.swift +++ b/fearless/Common/EventCenter/EventVisitor.swift @@ -26,6 +26,8 @@ protocol EventVisitorProtocol: AnyObject { func processStakingUpdatedEvent() func processZeroBalancesSettingChanged() func processRemoteSubscriptionWasUpdated(event: WalletRemoteSubscriptionWasUpdatedEvent) + + func processResetSoraCard() } extension EventVisitorProtocol { @@ -54,4 +56,6 @@ extension EventVisitorProtocol { func processStakingUpdatedEvent() {} func processZeroBalancesSettingChanged() {} func processRemoteSubscriptionWasUpdated(event _: WalletRemoteSubscriptionWasUpdatedEvent) {} + + func processResetSoraCard() {} } diff --git a/fearless/Common/EventCenter/Events/ResetSoraCard.swift b/fearless/Common/EventCenter/Events/ResetSoraCard.swift new file mode 100644 index 0000000000..b2b3213927 --- /dev/null +++ b/fearless/Common/EventCenter/Events/ResetSoraCard.swift @@ -0,0 +1,15 @@ +// +// ResetSoraCard.swift +// fearless +// +// Created by Денис Лебедько on 06.09.2023. +// Copyright © 2023 Soramitsu. All rights reserved. +// + +import Foundation + +struct ResetSoraCard: EventProtocol { + func accept(visitor: EventVisitorProtocol) { + visitor.processResetSoraCard() + } +} diff --git a/fearless/Modules/NewWallet/ChainAssetList/ChainAssetListInteractor.swift b/fearless/Modules/NewWallet/ChainAssetList/ChainAssetListInteractor.swift index b744efbefe..33eecb205a 100644 --- a/fearless/Modules/NewWallet/ChainAssetList/ChainAssetListInteractor.swift +++ b/fearless/Modules/NewWallet/ChainAssetList/ChainAssetListInteractor.swift @@ -330,6 +330,10 @@ extension ChainAssetListInteractor: EventVisitorProtocol { output?.handleWalletChanged(wallet: wallet) updateChainAssets(using: filters, sorts: sorts) } + + func processResetSoraCard() { + output?.didReceiveResetSoraCard() + } } extension ChainAssetListInteractor: ChainsIssuesCenterListener { diff --git a/fearless/Modules/NewWallet/ChainAssetList/ChainAssetListPresenter.swift b/fearless/Modules/NewWallet/ChainAssetList/ChainAssetListPresenter.swift index c1b1e67e7b..eef3d9bbc3 100644 --- a/fearless/Modules/NewWallet/ChainAssetList/ChainAssetListPresenter.swift +++ b/fearless/Modules/NewWallet/ChainAssetList/ChainAssetListPresenter.swift @@ -59,7 +59,8 @@ final class ChainAssetListPresenter { let prices = self.prices let chainsWithMissingAccounts = self.chainsWithMissingAccounts let onClose: () -> Void = { [weak self] in - self?.closeSoraCard() + SCard.shared?.isSCBannerHidden = true + self?.view?.setSoraCard(isHidden: true) } let onCard: () -> Void = { [weak self] in self?.router.startSoraCard(from: self?.view) @@ -107,11 +108,6 @@ final class ChainAssetListPresenter { } } - private func closeSoraCard() { - SCard.shared?.isSCBannerHidden = true - view?.closeSoraCard() - } - private func showMissingAccountOptions(chain: ChainModel) { let unused = (wallet.unusedChainIds ?? []).contains(chain.chainId) let options: [MissingAccountOption?] = [.create, .import, unused ? nil : .skip] @@ -310,6 +306,10 @@ extension ChainAssetListPresenter: ChainAssetListInteractorOutput { } provideViewModel() } + + func didReceiveResetSoraCard() { + view?.setSoraCard(isHidden: false) + } } // MARK: - Localizable diff --git a/fearless/Modules/NewWallet/ChainAssetList/ChainAssetListProtocols.swift b/fearless/Modules/NewWallet/ChainAssetList/ChainAssetListProtocols.swift index b4fc8b42b5..9fde56e5fb 100644 --- a/fearless/Modules/NewWallet/ChainAssetList/ChainAssetListProtocols.swift +++ b/fearless/Modules/NewWallet/ChainAssetList/ChainAssetListProtocols.swift @@ -7,7 +7,7 @@ typealias ChainAssetListModuleCreationResult = (view: ChainAssetListViewInput, i protocol ChainAssetListViewInput: ControllerBackedProtocol { func didReceive(viewModel: ChainAssetListViewModel) func reloadBanners() - func closeSoraCard() + func setSoraCard(isHidden: Bool) } protocol ChainAssetListViewOutput: AnyObject { @@ -39,6 +39,7 @@ protocol ChainAssetListInteractorOutput: AnyObject { func updateViewModel(isInitSearchState: Bool) func didReceive(accountInfosByChainAssets: [ChainAsset: AccountInfo?]) func handleWalletChanged(wallet: MetaAccountModel) + func didReceiveResetSoraCard() } protocol ChainAssetListRouterInput: diff --git a/fearless/Modules/NewWallet/ChainAssetList/ChainAssetListViewController.swift b/fearless/Modules/NewWallet/ChainAssetList/ChainAssetListViewController.swift index ff9171519a..e7aaba2afc 100644 --- a/fearless/Modules/NewWallet/ChainAssetList/ChainAssetListViewController.swift +++ b/fearless/Modules/NewWallet/ChainAssetList/ChainAssetListViewController.swift @@ -134,8 +134,11 @@ private extension ChainAssetListViewController { // MARK: - ChainAssetListViewInput extension ChainAssetListViewController: ChainAssetListViewInput { - func closeSoraCard() { - rootView.closeSoraCard() + func setSoraCard(isHidden: Bool) { + rootView.setSoraCard(isHidden: isHidden) + rootView.tableView.beginUpdates() + rootView.tableView.setAndLayoutTableHeaderView(header: rootView.headerViewContainer) + rootView.tableView.endUpdates() } func reloadBanners() { diff --git a/fearless/Modules/NewWallet/ChainAssetList/ChainAssetListViewLayout.swift b/fearless/Modules/NewWallet/ChainAssetList/ChainAssetListViewLayout.swift index de78f5bcb0..5bab5414e7 100644 --- a/fearless/Modules/NewWallet/ChainAssetList/ChainAssetListViewLayout.swift +++ b/fearless/Modules/NewWallet/ChainAssetList/ChainAssetListViewLayout.swift @@ -21,7 +21,7 @@ final class ChainAssetListViewLayout: UIView { var keyboardAdoptableConstraint: Constraint? weak var bannersView: UIView? - private var soraCardView: UIView? + private var soraCardCell: SCCardCell? var headerViewContainer: UIStackView = { UIFactory.default.createVerticalStackView(spacing: UIConstants.bigOffset) @@ -57,18 +57,18 @@ final class ChainAssetListViewLayout: UIView { func bindSoraCard(item: SCCardItem, isHidden: Bool) { let cell = SCCardCell() cell.set(item: item, context: nil) - if soraCardView == nil { - soraCardView = cell.contentView - soraCardView?.isHidden = isHidden - headerViewContainer.addArrangedSubview(soraCardView!) - soraCardView?.snp.makeConstraints { make in + if soraCardCell == nil { + soraCardCell = cell + soraCardCell?.contentView.isHidden = isHidden + headerViewContainer.addArrangedSubview(soraCardCell!.contentView) + soraCardCell?.contentView.snp.makeConstraints { make in make.leading.trailing.equalToSuperview() } } } - func closeSoraCard() { - soraCardView?.isHidden = true + func setSoraCard(isHidden: Bool) { + soraCardCell?.contentView.isHidden = isHidden } private func setupLayout() { diff --git a/fearless/Modules/Profile/ProfilePresenter.swift b/fearless/Modules/Profile/ProfilePresenter.swift index fcb51e04d7..1496169757 100644 --- a/fearless/Modules/Profile/ProfilePresenter.swift +++ b/fearless/Modules/Profile/ProfilePresenter.swift @@ -94,6 +94,9 @@ extension ProfilePresenter: ProfilePresenterProtocol { break case .zeroBalances: break + case .resetSoraCard: + SCard.shared?.isSCBannerHidden = false + eventCenter.notify(with: ResetSoraCard()) } } diff --git a/fearless/Modules/Profile/ViewModel/ProfileViewModelFactory.swift b/fearless/Modules/Profile/ViewModel/ProfileViewModelFactory.swift index 7d11c98a09..a7e5401a65 100644 --- a/fearless/Modules/Profile/ViewModel/ProfileViewModelFactory.swift +++ b/fearless/Modules/Profile/ViewModel/ProfileViewModelFactory.swift @@ -26,6 +26,7 @@ enum ProfileOption: UInt, CaseIterable { case biometry case about case zeroBalances + case resetSoraCard } final class ProfileViewModelFactory: ProfileViewModelFactoryProtocol { @@ -144,6 +145,8 @@ final class ProfileViewModelFactory: ProfileViewModelFactoryProtocol { return createCurrencyViewModel(from: currency, locale: locale) case .zeroBalances: return createZeroBalancesViewModel(for: locale, wallet: wallet) + case .resetSoraCard: + return createResetSoraCard() } } @@ -302,6 +305,19 @@ final class ProfileViewModelFactory: ProfileViewModelFactoryProtocol { return viewModel } + private func createResetSoraCard() -> ProfileOptionViewModel { + let title = "Get back this lovely banner" + let viewModel = ProfileOptionViewModel( + title: title, + icon: R.image.iconSoraCard()!, + accessoryTitle: nil, + accessoryImage: nil, + accessoryType: .arrow, + option: .resetSoraCard + ) + return viewModel + } + private func getDayChangeAttributedString( currency: Currency, dayChange: Decimal,