diff --git a/.github/workflows/PubtoPrivate.yml b/.github/workflows/PubtoPrivate.yml new file mode 100644 index 000000000..e565103cf --- /dev/null +++ b/.github/workflows/PubtoPrivate.yml @@ -0,0 +1,39 @@ +name: Sync Pub with Private (Mirror) + +on: + workflow_dispatch: + schedule: + - cron: "0 23 * * *" + +jobs: + sync: + runs-on: ubuntu-latest + + steps: + - name: Sync Fork with Upstream + # You may pin to the exact commit or the version. + uses: yesolutions/mirror-action@v0.6.0 + on: [push] + with: + # The remote ref name to use. 'mirror' by default. Useful to avoid conflicts with existing remotes. + REMOTE_NAME: ci-cd-litewallet-ios + # The remote repository e.g. https://github.com/octocat/foo.git or git@github.com:octocat/foo.git + REMOTE: https://github.com/litecoin-foundation/ci-cd-litewallet-ios.git + # Username for remote repository + GIT_USERNAME: kcw-grunt + # The git https password or token for the remote repository + GIT_PASSWORD: ${{ secrets.GITHUB_TOKEN }} + # The ssh private key for writing to the remote repository, if using ssh + GIT_SSH_PRIVATE_KEY: # optional + # The ssh public key for writing to the remote repository. Normally, not required at all + GIT_SSH_PUBLIC_KEY: # optional + # The contents of a SSH known_hosts file for host key verification + GIT_SSH_KNOWN_HOSTS: # optional + # if true, skips host key verification. Mutually exclusive with GIT_SSH_KNOWN_HOSTS + GIT_SSH_NO_VERIFY_HOST: # optional, default is false + # Push all refs instead of just the current branch + PUSH_ALL_REFS: # optional, default is true + # The arugments to use when pushing the repository + GIT_PUSH_ARGS: # optional, default is --tags --force --prune + # set to "true" to enable debug mode + DEBUG: # optional, default is false diff --git a/.gitignore b/.gitignore index 38e56ddba..730e9d7ce 100644 --- a/.gitignore +++ b/.gitignore @@ -43,3 +43,7 @@ Pods/ BuildTools/.build BuildTools/.swiftpm + +# Sensitive Partner API +Modules/litewallet-partner-api-ios +litewallet-partner-api-ios \ No newline at end of file diff --git a/.gitmodules b/.gitmodules index 6577b81d3..b678bdc7f 100644 --- a/.gitmodules +++ b/.gitmodules @@ -7,3 +7,6 @@ [submodule "Modules/loafwallet-core"] path = Modules/loafwallet-core url = https://github.com/litecoin-foundation/loafwallet-core.git +[submodule "Modules/litewallet-partner-api-ios"] + path = Modules/litewallet-partner-api-ios + url = https://github.com/litecoin-foundation/litewallet-partner-api-ios.git diff --git a/Podfile b/Podfile deleted file mode 100644 index bf7186807..000000000 --- a/Podfile +++ /dev/null @@ -1,39 +0,0 @@ -source 'https://github.com/CocoaPods/Specs.git' -workspace 'loafwallet.xcworkspace' -project 'loafwallet.xcodeproj', 'Debug' => :debug,'Release' => :release -use_frameworks! -platform :ios, '13.0' - -#Shared Cocoapods -def shared_pods - pod 'UnstoppableDomainsResolution', '~> 4.0.0' - pod 'KeychainAccess', '~> 4.2' - pod 'Firebase/Analytics' - pod 'Firebase/Crashlytics' -end - -#Main targets -target 'loafwallet' do - shared_pods - target 'loafwalletTests' do - inherit! :search_paths - end -end - -#Setting the Cocoapods config -post_install do |installer| - - #Removes the arm64 models from the sim / test . May be removed when iOS can handle. - installer.pods_project.build_configurations.each do |config| - config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64" - end - - #Sets all pods to iOS 10.0 or greater - installer.pods_project.targets.each do |target| - target.build_configurations.each do |config| - config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '10.0' - end - end - -end - diff --git a/Podfile.lock b/Podfile.lock deleted file mode 100644 index 8f6ba7345..000000000 --- a/Podfile.lock +++ /dev/null @@ -1,124 +0,0 @@ -PODS: - - BigInt (5.2.0) - - CryptoSwift (1.4.3) - - Firebase/Analytics (6.34.0): - - Firebase/Core - - Firebase/Core (6.34.0): - - Firebase/CoreOnly - - FirebaseAnalytics (= 6.9.0) - - Firebase/CoreOnly (6.34.0): - - FirebaseCore (= 6.10.4) - - Firebase/Crashlytics (6.34.0): - - Firebase/CoreOnly - - FirebaseCrashlytics (~> 4.6.2) - - FirebaseAnalytics (6.9.0): - - FirebaseCore (~> 6.10) - - FirebaseInstallations (~> 1.7) - - GoogleAppMeasurement (= 6.9.0) - - GoogleUtilities/AppDelegateSwizzler (~> 6.7) - - GoogleUtilities/MethodSwizzler (~> 6.7) - - GoogleUtilities/Network (~> 6.7) - - "GoogleUtilities/NSData+zlib (~> 6.7)" - - nanopb (~> 1.30906.0) - - FirebaseCore (6.10.4): - - FirebaseCoreDiagnostics (~> 1.6) - - GoogleUtilities/Environment (~> 6.7) - - GoogleUtilities/Logger (~> 6.7) - - FirebaseCoreDiagnostics (1.7.0): - - GoogleDataTransport (~> 7.4) - - GoogleUtilities/Environment (~> 6.7) - - GoogleUtilities/Logger (~> 6.7) - - nanopb (~> 1.30906.0) - - FirebaseCrashlytics (4.6.2): - - FirebaseCore (~> 6.10) - - FirebaseInstallations (~> 1.6) - - GoogleDataTransport (~> 7.2) - - nanopb (~> 1.30906.0) - - PromisesObjC (~> 1.2) - - FirebaseInstallations (1.7.0): - - FirebaseCore (~> 6.10) - - GoogleUtilities/Environment (~> 6.7) - - GoogleUtilities/UserDefaults (~> 6.7) - - PromisesObjC (~> 1.2) - - GoogleAppMeasurement (6.9.0): - - GoogleUtilities/AppDelegateSwizzler (~> 6.7) - - GoogleUtilities/MethodSwizzler (~> 6.7) - - GoogleUtilities/Network (~> 6.7) - - "GoogleUtilities/NSData+zlib (~> 6.7)" - - nanopb (~> 1.30906.0) - - GoogleDataTransport (7.5.1): - - nanopb (~> 1.30906.0) - - GoogleUtilities/AppDelegateSwizzler (6.7.2): - - GoogleUtilities/Environment - - GoogleUtilities/Logger - - GoogleUtilities/Network - - GoogleUtilities/Environment (6.7.2): - - PromisesObjC (~> 1.2) - - GoogleUtilities/Logger (6.7.2): - - GoogleUtilities/Environment - - GoogleUtilities/MethodSwizzler (6.7.2): - - GoogleUtilities/Logger - - GoogleUtilities/Network (6.7.2): - - GoogleUtilities/Logger - - "GoogleUtilities/NSData+zlib" - - GoogleUtilities/Reachability - - "GoogleUtilities/NSData+zlib (6.7.2)" - - GoogleUtilities/Reachability (6.7.2): - - GoogleUtilities/Logger - - GoogleUtilities/UserDefaults (6.7.2): - - GoogleUtilities/Logger - - KeychainAccess (4.2.2) - - nanopb (1.30906.0): - - nanopb/decode (= 1.30906.0) - - nanopb/encode (= 1.30906.0) - - nanopb/decode (1.30906.0) - - nanopb/encode (1.30906.0) - - PromisesObjC (1.2.12) - - UnstoppableDomainsResolution (4.0.0): - - BigInt - - CryptoSwift - -DEPENDENCIES: - - Firebase/Analytics - - Firebase/Crashlytics - - KeychainAccess (~> 4.2) - - UnstoppableDomainsResolution (~> 4.0.0) - -SPEC REPOS: - https://github.com/CocoaPods/Specs.git: - - BigInt - - CryptoSwift - - Firebase - - FirebaseAnalytics - - FirebaseCore - - FirebaseCoreDiagnostics - - FirebaseCrashlytics - - FirebaseInstallations - - GoogleAppMeasurement - - GoogleDataTransport - - GoogleUtilities - - KeychainAccess - - nanopb - - PromisesObjC - - UnstoppableDomainsResolution - -SPEC CHECKSUMS: - BigInt: f668a80089607f521586bbe29513d708491ef2f7 - CryptoSwift: a0799ee936271bd2253a006f1e4523df21845000 - Firebase: c23a36d9e4cdf7877dfcba8dd0c58add66358999 - FirebaseAnalytics: 3bb096873ee0d7fa4b6c70f5e9166b6da413cc7f - FirebaseCore: d3a978a3cfa3240bf7e4ba7d137fdf5b22b628ec - FirebaseCoreDiagnostics: 770ac5958e1372ce67959ae4b4f31d8e127c3ac1 - FirebaseCrashlytics: 1a747c9cc084a24dc6d9511c991db1cd078154eb - FirebaseInstallations: 466c7b4d1f58fe16707693091da253726a731ed2 - GoogleAppMeasurement: a6a3a066369828db64eda428cb2856dc1cdc7c4e - GoogleDataTransport: f56af7caa4ed338dc8e138a5d7c5973e66440833 - GoogleUtilities: 7f2f5a07f888cdb145101d6042bc4422f57e70b3 - KeychainAccess: c0c4f7f38f6fc7bbe58f5702e25f7bd2f65abf51 - nanopb: 59317e09cf1f1a0af72f12af412d54edf52603fc - PromisesObjC: 3113f7f76903778cf4a0586bd1ab89329a0b7b97 - UnstoppableDomainsResolution: c3c67f4d0a5e2437cb00d4bd50c2e00d6e743841 - -PODFILE CHECKSUM: cb5fb9baf866887c0e8fd058304fe223b0154d12 - -COCOAPODS: 1.11.3 diff --git a/TransferAmountView.swift b/TransferAmountView.swift deleted file mode 100644 index 1f9071f1d..000000000 --- a/TransferAmountView.swift +++ /dev/null @@ -1,317 +0,0 @@ -import SwiftUI - -struct TransferAmountView: View { - // MARK: - Combine Variables - - @ObservedObject - var viewModel: TransferAmountViewModel - - @ObservedObject - var transferringviewModel = TransferringViewModel() - - @Binding - var shouldShow: Bool - - @State - private var didStartTransferringView = false - - @State - private var shouldStartTransfer = false - - @State - private var transferAmount: Double = 0.0 - - @Binding - var sliderValue: Double - - // MARK: - Private Variables - - private let mainPadding: CGFloat = 20.0 - - private let smallButtonSize: CGFloat = 25.0 - - private var transferAmountTo: String { - return viewModel.walletType == .litewallet ? - S.LitecoinCard.Transfer.amountToCard : - S.LitecoinCard.Transfer.amountToLitewallet - } - - private var remainingCardBalance: Double { - if viewModel.walletType == .litewallet { - return abs(viewModel.cardBalance + (viewModel.currentBalance * sliderValue)) - } else { - return abs(viewModel.cardBalance - (viewModel.currentBalance * sliderValue)) - } - } - - private var remainingLitewalletBalance: Double { - if viewModel.walletType == .litecoinCard { - return abs(viewModel.litewalletBalance + (viewModel.currentBalance * sliderValue)) - } else { - return abs(viewModel.litewalletBalance - (viewModel.currentBalance * sliderValue)) - } - } - - init(viewModel: TransferAmountViewModel, - sliderValue: Binding, - shouldShow: Binding) - { - self.viewModel = viewModel - - _sliderValue = sliderValue - - _shouldShow = shouldShow - } - - private func increaseValue() { - // Only take action when value is less than the current balance - if transferAmount < viewModel.currentBalance { - transferAmount = transferAmount + 0.001 - viewModel.transferAmount = transferAmount - sliderValue = abs(transferAmount / viewModel.currentBalance) - } - } - - private func decreaseValue() { - // Only take action when value is more than 0.001 - if transferAmount > 0.001 { - transferAmount = transferAmount - 0.001 - viewModel.transferAmount = transferAmount - sliderValue = abs(transferAmount / viewModel.currentBalance) - } - } - - var body: some View { - ZStack { - if didStartTransferringView { - TransferringModalView(viewModel: transferringviewModel, - isShowingTransferring: $didStartTransferringView, - shouldStartTransfer: $shouldStartTransfer, - destinationAddress: viewModel.destinationAddress, - transferAmount: viewModel.currentBalance * sliderValue, - walletType: viewModel.walletType) - .zIndex(1) - .onReceive(transferringviewModel.$shouldStartTransfer) { _ in - if transferringviewModel.shouldStartTransfer { - // Transfer to Litecoin Card - if viewModel.walletType == .litewallet { - viewModel.transferToCard(amount: - viewModel.transferAmount, - address: viewModel.destinationAddress) { didSend in - didStartTransferringView = didSend - } - - // Transfer to Litewallet - } else if viewModel.walletType == .litecoinCard { - viewModel.transferToLitewallet(amount: viewModel.transferAmount, - address: viewModel.destinationAddress) { - didStartTransferringView = false - } - } - - DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) { - shouldShow = false - } - } - } - } - - VStack { - Group { - // Litewallet Balance Amount - HStack { - Text(S.LitecoinCard.Transfer.litewalletBalance + ": ") - .font(Font(UIFont.barlowSemiBold(size: 18.0))) - .foregroundColor(Color.liteWalletBlue) - - Spacer() - - Text(String(format: "%5.4f", remainingLitewalletBalance) + " Ł") - .font(Font(UIFont.barlowLight(size: 18.0))) - .foregroundColor(Color.liteWalletBlue) - .padding(.trailing, 5.0) - } - - // Card Balance Amount - HStack { - Text(S.LitecoinCard.cardBalance + ": ") - .font(Font(UIFont.barlowSemiBold(size: 18.0))) - .foregroundColor(Color.liteWalletBlue) - - Spacer() - - Text(String(format: "%5.4f", remainingCardBalance) + " Ł") - .font(Font(UIFont.barlowLight(size: 18.0))) - .foregroundColor(Color.liteWalletBlue) - .padding(.trailing, 5.0) - } - - // Transfer Amount - HStack { - Text(transferAmountTo + ": ") - .font(Font(UIFont.barlowSemiBold(size: 18.0))) - .foregroundColor(Color.liteWalletBlue) - - Spacer() - - Text(String(format: "%5.4f", viewModel.currentBalance * sliderValue) + " Ł") - .font(Font(UIFont.barlowBold(size: 18.0))) - .foregroundColor(Color.liteWalletBlue) - .padding(.trailing, 5.0) - } - - // Destination Address - HStack { - Text(S.LitecoinCard.Transfer.destinationAddress + ": ") - .font(Font(UIFont.barlowSemiBold(size: 18.0))) - .foregroundColor(Color.liteWalletBlue) - - Spacer() - - Text(viewModel.destinationAddress) - .font(Font(UIFont.barlowLight(size: 14.0))) - .foregroundColor(Color.liteWalletBlue) - .padding(.trailing, 5.0) - } - } - - // Underline view - Divider() - - // Amount Slider - Group { - HStack { - // Decrease value - Button(action: { - decreaseValue() - }) { - Image(systemName: "minus.circle.fill") - .resizable() - .aspectRatio(contentMode: .fit) - .frame(width: smallButtonSize, - height: smallButtonSize, - alignment: .center) - .foregroundColor(.liteWalletBlue) - } - .shadow(radius: 2.0, x: 2.0, y: 2.0) - - // Slider factor - Slider(value: $sliderValue, - in: 0 ... 1) { _ in - transferAmount = sliderValue * viewModel.currentBalance - } - .accentColor(.liteWalletBlue) - .padding() - - // Increase value - Button(action: { - increaseValue() - }) { - Image(systemName: "plus.circle.fill") - .resizable() - .aspectRatio(contentMode: .fit) - .frame(width: smallButtonSize, - height: smallButtonSize, - alignment: .center) - .foregroundColor(.liteWalletBlue) - } - .shadow(radius: 2.0, x: 2.0, y: 2.0) - } - .padding(.bottom, 20.0) - } - - // Show transfer modal view - Button(action: { - viewModel.transferAmount = transferAmount - - didStartTransferringView = true - - }) { - Text(S.LitecoinCard.Transfer.startTransfer.localizedUppercase) - .font(Font(UIFont.barlowSemiBold(size: 18.0))) - .frame(maxWidth: .infinity) - .padding(.all, 10.0) - .foregroundColor(.white) - .background(sliderValue == 0.0 ? Color.litecoinGray : Color(UIColor.liteWalletBlue)) - .cornerRadius(4.0) - .overlay( - RoundedRectangle(cornerRadius: 4) - .stroke(Color.litecoinSilver) - ) - } - .padding(.bottom, 5.0) - .disabled(sliderValue == 0.0 ? true : false) - - // Cancel: Resets the slider - Button(action: { - self.shouldShow = false - sliderValue = 0.0 - }) { - Text(S.Button.cancel.uppercased()) - .font(Font(UIFont.barlowSemiBold(size: 18.0))) - .frame(maxWidth: .infinity) - .foregroundColor(Color(UIColor.liteWalletBlue)) - .background(Color(UIColor.white)) - .cornerRadius(4.0) - .padding(.all, 10.0) - .overlay( - RoundedRectangle(cornerRadius: 4) - .stroke(Color.litecoinSilver) - ) - } - Spacer() - } - .padding([.leading, .trailing], mainPadding) - } - } -} - -struct TransferAmountView_Previews: PreviewProvider { - static let walletManager = try! WalletManager(store: Store()) - - static let lwPlusviewModel = TransferAmountViewModel(walletType: .litewallet, - litewalletBalance: 520.0, - litewalletAddress: "MVZj7gBRwcVpa9AAWdJm8A3HqTst112eJe", - cardBalance: 0.0, - cardAddress: "MJ4W7NZya4SzE7R6xpEVdamGCimaQYPiWu", - walletManager: walletManager, - store: Store()) - - static let lwlcPlusviewModel = TransferAmountViewModel(walletType: .litewallet, - litewalletBalance: 520.0, - litewalletAddress: "MVZj7gBRwcVpa9AAWdJm8A3HqTst112eJe", - cardBalance: 0.658, - cardAddress: "MJ4W7NZya4SzE7R6xpEVdamGCimaQYPiWu", - walletManager: walletManager, - store: Store()) - - static let cardPlusviewModel = TransferAmountViewModel(walletType: .litecoinCard, - litewalletBalance: 0.0, - litewalletAddress: "MVZj7gBRwcVpa9AAWdJm8A3HqTst112eJe", - cardBalance: 0.0555, - cardAddress: "MJ4W7NZya4SzE7R6xpEVdamGCimaQYPiWu", - walletManager: walletManager, - store: Store()) - - static var previews: some View { - Group { - TransferAmountView(viewModel: lwPlusviewModel, - sliderValue: .constant(0.5), - shouldShow: .constant(true)) - .previewDevice(PreviewDevice(rawValue: DeviceType.Name.iPhoneSE2)) - .previewDisplayName(DeviceType.Name.iPhoneSE2) - - TransferAmountView(viewModel: cardPlusviewModel, - sliderValue: .constant(0.0), - shouldShow: .constant(true)) - .previewDevice(PreviewDevice(rawValue: DeviceType.Name.iPhone8)) - .previewDisplayName(DeviceType.Name.iPhone8) - - TransferAmountView(viewModel: lwlcPlusviewModel, - sliderValue: .constant(0.5), - shouldShow: .constant(true)) - .previewDevice(PreviewDevice(rawValue: DeviceType.Name.iPhoneXSMax)) - .previewDisplayName(DeviceType.Name.iPhoneSE2) - } - } -} diff --git a/loafwallet.xcodeproj/project.pbxproj b/loafwallet.xcodeproj/project.pbxproj index 31d6e9bb9..1bce05d7a 100644 --- a/loafwallet.xcodeproj/project.pbxproj +++ b/loafwallet.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 52; + objectVersion = 54; objects = { /* Begin PBXBuildFile section */ @@ -112,7 +112,6 @@ 24D5F26F225A5BEA00225462 /* ContainerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 24D5F26D225A5BEA00225462 /* ContainerViewController.swift */; }; 24D91D0B2166923E0077A619 /* UserNotifications.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 24D91D0A2166923E0077A619 /* UserNotifications.framework */; }; 24DFCE6823B89CDE001F17F8 /* Settings.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 24DFCE6723B89CDE001F17F8 /* Settings.storyboard */; }; - 28444E99F1C17FA0065EBE35 /* Pods_loafwallet.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 47013A7996D32E67CB239C06 /* Pods_loafwallet.framework */; }; 375DDB3F2697C253005E2B27 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 375DDB3D2697C253005E2B27 /* GoogleService-Info.plist */; }; 7503773D1DF57428005EB8AE /* WalletManager+Auth.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7503773C1DF57428005EB8AE /* WalletManager+Auth.swift */; }; 751734B91DAC941E00193C87 /* sec-sub-1.c in Sources */ = {isa = PBXBuildFile; fileRef = 755CD8BE1DAA16820075898E /* sec-sub-1.c */; }; @@ -248,82 +247,51 @@ 75A2A8101DA5936F00A983D8 /* MainInterface.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 75A2A80E1DA5936F00A983D8 /* MainInterface.storyboard */; }; 75A2A8141DA5936F00A983D8 /* TodayExtension.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 75A2A8081DA5936F00A983D8 /* TodayExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; 75C735AA1DAA1B9C00251ECF /* libunbound.c in Sources */ = {isa = PBXBuildFile; fileRef = 755CD4121DAA0E3E0075898E /* libunbound.c */; }; - A723608E9C347E4BD3E6BCDA /* Pods_loafwalletTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3058D709119F89F54447395D /* Pods_loafwalletTests.framework */; }; C30029E225D0185500F08C2B /* StandardDividerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C30029E125D0185500F08C2B /* StandardDividerView.swift */; }; C30029EB25D019BC00F08C2B /* CopyButtonView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C30029EA25D019BC00F08C2B /* CopyButtonView.swift */; }; - C308993F2616124800EE6A40 /* CardWalletTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C308993E2616124800EE6A40 /* CardWalletTests.swift */; }; C30899792616426800EE6A40 /* ForgotAlertViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = C30899782616426800EE6A40 /* ForgotAlertViewModel.swift */; }; - C30AFB4E2598FC1B00CDCF69 /* LitewalletPartnerAPI in Frameworks */ = {isa = PBXBuildFile; productRef = C30AFB4D2598FC1B00CDCF69 /* LitewalletPartnerAPI */; }; - C30AFB642598FFB200CDCF69 /* PartnerAPIManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = C30AFB632598FFB200CDCF69 /* PartnerAPIManager.swift */; }; C316CF49261887FC00E4C09B /* UIApplication+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = C316CF48261887FC00E4C09B /* UIApplication+Extension.swift */; }; C3188E2726431E750008ADD1 /* Debug-GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = C3188E2526431E750008ADD1 /* Debug-GoogleService-Info.plist */; }; C3188E3326445EA20008ADD1 /* FileTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3188E3226445EA20008ADD1 /* FileTests.swift */; }; C31891C1267338D300ECE25C /* NonUSTabBarViewControllerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C31891C0267338D300ECE25C /* NonUSTabBarViewControllerTests.swift */; }; C31891C326733FD400ECE25C /* TabBarViewControllerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C31891C226733FD400ECE25C /* TabBarViewControllerTests.swift */; }; - C31FEECE26CA7F8C00DF4999 /* PreTransferViewModelTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C31FEECD26CA7F8C00DF4999 /* PreTransferViewModelTests.swift */; }; - C31FEED026CB06B500DF4999 /* TransferAmountViewModelTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C31FEECF26CB06B500DF4999 /* TransferAmountViewModelTests.swift */; }; - C31FEED226CB06CB00DF4999 /* TransferringViewModelTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C31FEED126CB06CB00DF4999 /* TransferringViewModelTests.swift */; }; C32142EA25C97CD900BECCD0 /* TransactionCellView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C32142E925C97CD900BECCD0 /* TransactionCellView.swift */; }; C32142FA25C988C800BECCD0 /* TransactionCellViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = C32142F925C988C800BECCD0 /* TransactionCellViewModel.swift */; }; - C3270B99259BF7F20073DA7B /* LitecoinCardUser.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3270B98259BF7F20073DA7B /* LitecoinCardUser.swift */; }; C32DAE0725925B7E003FC978 /* Color+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = C32DAE0625925B7E003FC978 /* Color+Extension.swift */; }; - C32DAE9125929492003FC978 /* CardViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C32DAE9025929492003FC978 /* CardViewController.swift */; }; - C32DB42D264847FD00017D26 /* CardTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C32DB42C264847FD00017D26 /* CardTests.swift */; }; C32DB42F26488CAA00017D26 /* NonUSTabBarViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C32DB42E26488CAA00017D26 /* NonUSTabBarViewController.swift */; }; - C32DC793259396AB00A7FDB4 /* CardViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = C32DC792259396AB00A7FDB4 /* CardViewModel.swift */; }; - C32DC79C2593971500A7FDB4 /* CardView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C32DC79B2593971500A7FDB4 /* CardView.swift */; }; - C32DC7AC2593B5C900A7FDB4 /* AnimatedCardView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C32DC7AB2593B5C900A7FDB4 /* AnimatedCardView.swift */; }; - C32DC7B52593B61F00A7FDB4 /* AnimatedCardViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = C32DC7B42593B61F00A7FDB4 /* AnimatedCardViewModel.swift */; }; C339752127001BEC0071FED6 /* EmailValidation.swift in Sources */ = {isa = PBXBuildFile; fileRef = C339752027001BEC0071FED6 /* EmailValidation.swift */; }; - C345D81525A8D52600657E30 /* LoginViewModelTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C345D81425A8D52600657E30 /* LoginViewModelTests.swift */; }; - C345D82525A8D54200657E30 /* RegistrationViewModelTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C345D82425A8D54200657E30 /* RegistrationViewModelTests.swift */; }; - C345D83725A8D57E00657E30 /* AnimatedCardViewModelTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C345D83625A8D57E00657E30 /* AnimatedCardViewModelTests.swift */; }; C350788C27DCB10700A50819 /* TextView+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = C350788B27DCB10700A50819 /* TextView+Extension.swift */; }; C3543A27264AFE490005D17A /* LocaleChangeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3543A26264AFE490005D17A /* LocaleChangeView.swift */; }; C3543A29264AFE720005D17A /* LocaleChangeViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3543A28264AFE720005D17A /* LocaleChangeViewModel.swift */; }; - C354C45A258FA9C000675E0E /* MainTabBarViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = C354C459258FA9C000675E0E /* MainTabBarViewModel.swift */; }; C354C4632590059500675E0E /* TransactionsViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = C354C4622590059500675E0E /* TransactionsViewModel.swift */; }; C35ABD232574070A002BB9BB /* PartnersView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C35ABD222574070A002BB9BB /* PartnersView.swift */; }; C35ABD332574073F002BB9BB /* PartnersViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = C35ABD322574073F002BB9BB /* PartnersViewModel.swift */; }; + C35C1220293D464A0009022D /* FirebaseAnalytics in Frameworks */ = {isa = PBXBuildFile; productRef = C35C121F293D464A0009022D /* FirebaseAnalytics */; }; + C35C1222293D464A0009022D /* FirebaseAuth in Frameworks */ = {isa = PBXBuildFile; productRef = C35C1221293D464A0009022D /* FirebaseAuth */; }; + C35C1224293D464A0009022D /* FirebaseCrashlytics in Frameworks */ = {isa = PBXBuildFile; productRef = C35C1223293D464A0009022D /* FirebaseCrashlytics */; }; + C35C1227293D47EE0009022D /* UnstoppableDomainsResolution in Frameworks */ = {isa = PBXBuildFile; productRef = C35C1226293D47EE0009022D /* UnstoppableDomainsResolution */; }; + C35C122A293D48340009022D /* KeychainAccess in Frameworks */ = {isa = PBXBuildFile; productRef = C35C1229293D48340009022D /* KeychainAccess */; }; C361F48228B368BC00E9798F /* AddressFieldView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C361F48128B368BC00E9798F /* AddressFieldView.swift */; }; C36375A328BD38A500CFB3D8 /* SendButtonHostingController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C36375A228BD38A500CFB3D8 /* SendButtonHostingController.swift */; }; C36375A528BD390C00CFB3D8 /* SendButtonView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C36375A428BD390C00CFB3D8 /* SendButtonView.swift */; }; C36DBF5F28F18D2C00FBCB24 /* LocalWebView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C36DBF5E28F18D2C00FBCB24 /* LocalWebView.swift */; }; C36DBF6128F1988900FBCB24 /* LocalWebViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = C36DBF6028F1988900FBCB24 /* LocalWebViewModel.swift */; }; - C377519926B09A3400E1FB12 /* TransferringView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C377519826B09A3400E1FB12 /* TransferringView.swift */; }; - C377519B26B0A3D900E1FB12 /* TransferringViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = C377519A26B0A3D900E1FB12 /* TransferringViewModel.swift */; }; - C379F228259B9BF000B25883 /* RegistrationAlertView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C379F227259B9BF000B25883 /* RegistrationAlertView.swift */; }; - C38CFE8326B9250300FC6258 /* CardIconView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C38CFE8226B9250300FC6258 /* CardIconView.swift */; }; C39443F9269DDAD3002703E9 /* LitewalletIconView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C39443F8269DDAD3002703E9 /* LitewalletIconView.swift */; }; C39A71472608CB4300E7B640 /* EmptyTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = C39A71462608CB4300E7B640 /* EmptyTableViewCell.swift */; }; C3A4647D259A646A00D74D81 /* DataValidation.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3A4647C259A646A00D74D81 /* DataValidation.swift */; }; C3B7C3B9255EABBF00E98A64 /* SupportSafariViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3B7C3B8255EABBF00E98A64 /* SupportSafariViewModel.swift */; }; C3B7C3EE255FF59200E98A64 /* ConstantsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3B7C3ED255FF59200E98A64 /* ConstantsTests.swift */; }; - C3BD49B72595420A00D97079 /* RegistrationViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3BD49B62595420A00D97079 /* RegistrationViewModel.swift */; }; - C3BD49C02595423400D97079 /* RegistrationView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3BD49BF2595423400D97079 /* RegistrationView.swift */; }; C3BD49C925954A1B00D97079 /* ForgotView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3BD49C825954A1B00D97079 /* ForgotView.swift */; }; - C3BD49D225954A3200D97079 /* ForgotViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3BD49D125954A3200D97079 /* ForgotViewModel.swift */; }; - C3BD4A4A2597542700D97079 /* LoginCardAlertView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3BD4A492597542700D97079 /* LoginCardAlertView.swift */; }; C3BD4A5325975C6000D97079 /* View+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3BD4A5225975C6000D97079 /* View+Extension.swift */; }; - C3BD4A6A2597E1E900D97079 /* CardLoggedInView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3BD4A692597E1E900D97079 /* CardLoggedInView.swift */; }; - C3BDB42A26CDA74B004DAE77 /* CardNoTransferView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3BDB42926CDA74B004DAE77 /* CardNoTransferView.swift */; }; - C3BF74D926114969001CE2BB /* CardWalletDetails.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3BF74D826114969001CE2BB /* CardWalletDetails.swift */; }; - C3BFD349259E31C100136837 /* LoginViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3BFD348259E31C100136837 /* LoginViewModel.swift */; }; C3C8973825CD6B9300241FBE /* HostingTransactionCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3C8973725CD6B9300241FBE /* HostingTransactionCell.swift */; }; - C3C8E1892694F204006522B7 /* PreTransferView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3C8E1882694F204006522B7 /* PreTransferView.swift */; }; - C3C8E18B2694F3B9006522B7 /* PreTransferViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3C8E18A2694F3B9006522B7 /* PreTransferViewModel.swift */; }; C3D4379F2566EA3E00F423E1 /* LWActivityIndicator.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3D4379E2566EA3E00F423E1 /* LWActivityIndicator.swift */; }; + C3D471F7294337E700D9E415 /* CardWebViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3D471F6294337E700D9E415 /* CardWebViewController.swift */; }; C3D783A72565EA4B0004FF70 /* UnstoppableDomainView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3D783A62565EA4A0004FF70 /* UnstoppableDomainView.swift */; }; C3D783B72565EA6B0004FF70 /* UnstoppableDomainViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3D783B62565EA6B0004FF70 /* UnstoppableDomainViewModel.swift */; }; C3D783C02565ECF60004FF70 /* UnstoppableDomainViewModelTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3D783BF2565ECF60004FF70 /* UnstoppableDomainViewModelTests.swift */; }; - C3D8781E26CE602E009EF8CA /* CardTwoFactor.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3D8781D26CE602E009EF8CA /* CardTwoFactor.swift */; }; - C3DAAE2D26C9C19600D9E18C /* Enter2FACodeViewModelTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3DAAE2C26C9C19600D9E18C /* Enter2FACodeViewModelTests.swift */; }; - C3E77C0926C2807200693E22 /* Enter2FACodeViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3E77C0826C2807200693E22 /* Enter2FACodeViewModel.swift */; }; - C3EB6C1B26C18DD500881841 /* Enter2FACodeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3EB6C1A26C18DD500881841 /* Enter2FACodeView.swift */; }; C3EFA9A12650807B005C59B5 /* LockScreenHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3EFA9A02650807B005C59B5 /* LockScreenHeaderView.swift */; }; C3EFA9A3265080FF005C59B5 /* LockScreenHeaderViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3EFA9A2265080FF005C59B5 /* LockScreenHeaderViewModel.swift */; }; C3EFA9A62651A808005C59B5 /* LockScreenTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3EFA9A52651A808005C59B5 /* LockScreenTests.swift */; }; - C3F4A4A326A2FA1D0008B1B2 /* TransferAmountView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3F4A4A226A2FA1D0008B1B2 /* TransferAmountView.swift */; }; C3F4A4A526A2FB1E0008B1B2 /* TransferAmountViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3F4A4A426A2FB1E0008B1B2 /* TransferAmountViewModel.swift */; }; C3F7BCDC25FEC6AD00694C28 /* FailedAlertView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3F7BCD925FEC6AC00694C28 /* FailedAlertView.swift */; }; C3F7BCDD25FEC6AD00694C28 /* DomainResolutionFailure.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3F7BCDA25FEC6AC00694C28 /* DomainResolutionFailure.swift */; }; @@ -593,11 +561,8 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ - 088CD65386992FF5DD0B654B /* Pods-loafwallet.testnet.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-loafwallet.testnet.xcconfig"; path = "Target Support Files/Pods-loafwallet/Pods-loafwallet.testnet.xcconfig"; sourceTree = ""; }; 1B3F74211FFB106200CCA50C /* BiometricsSettingsViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = BiometricsSettingsViewController.swift; path = src/ViewControllers/BiometricsSettingsViewController.swift; sourceTree = ""; }; 1B3F74221FFB106200CCA50C /* BiometricsSpendingLimitViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = BiometricsSpendingLimitViewController.swift; path = src/ViewControllers/BiometricsSpendingLimitViewController.swift; sourceTree = ""; }; - 1BA74B85206AD60A0083BD2A /* Fabric.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Fabric.framework; sourceTree = ""; }; - 1BA74B86206AD60A0083BD2A /* Crashlytics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Crashlytics.framework; sourceTree = ""; }; 1BA9FE3B216F68A600BB2DE8 /* BRBech32.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BRBech32.h; sourceTree = ""; }; 1BA9FE3C216F68A700BB2DE8 /* BRBech32.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = BRBech32.c; sourceTree = ""; }; 1BBAEBE81F80237B0047DEA8 /* BRAddress.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = BRAddress.c; sourceTree = ""; }; @@ -832,10 +797,7 @@ 24D91D0A2166923E0077A619 /* UserNotifications.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UserNotifications.framework; path = System/Library/Frameworks/UserNotifications.framework; sourceTree = SDKROOT; }; 24D91D0D2166A5480077A619 /* TestnetData.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestnetData.swift; sourceTree = ""; }; 24DFCE6723B89CDE001F17F8 /* Settings.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = Settings.storyboard; sourceTree = ""; }; - 3058D709119F89F54447395D /* Pods_loafwalletTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_loafwalletTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 375DDB3D2697C253005E2B27 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = ""; }; - 47013A7996D32E67CB239C06 /* Pods_loafwallet.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_loafwallet.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 6C3B4621CCAC54A4057653A5 /* Pods-loafwallet.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-loafwallet.release.xcconfig"; path = "Target Support Files/Pods-loafwallet/Pods-loafwallet.release.xcconfig"; sourceTree = ""; }; 7503773C1DF57428005EB8AE /* WalletManager+Auth.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "WalletManager+Auth.swift"; path = "src/WalletManager+Auth.swift"; sourceTree = ""; }; 7528D2971ECF655500925DBC /* PaymentProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = PaymentProtocol.swift; path = src/PaymentProtocol.swift; sourceTree = ""; }; 752FB03B1DF8BE4B009086FB /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; @@ -1434,32 +1396,17 @@ 75FEFD1B1DAED56E00203D3A /* libsqlite3.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libsqlite3.tbd; path = usr/lib/libsqlite3.tbd; sourceTree = SDKROOT; }; C30029E125D0185500F08C2B /* StandardDividerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StandardDividerView.swift; sourceTree = ""; }; C30029EA25D019BC00F08C2B /* CopyButtonView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CopyButtonView.swift; sourceTree = ""; }; - C308993E2616124800EE6A40 /* CardWalletTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CardWalletTests.swift; sourceTree = ""; }; C30899782616426800EE6A40 /* ForgotAlertViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ForgotAlertViewModel.swift; sourceTree = ""; }; - C30AFB632598FFB200CDCF69 /* PartnerAPIManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PartnerAPIManager.swift; sourceTree = ""; }; C316CF48261887FC00E4C09B /* UIApplication+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIApplication+Extension.swift"; sourceTree = ""; }; C3188E2526431E750008ADD1 /* Debug-GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "Debug-GoogleService-Info.plist"; sourceTree = ""; }; C3188E3226445EA20008ADD1 /* FileTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileTests.swift; sourceTree = ""; }; C31891C0267338D300ECE25C /* NonUSTabBarViewControllerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NonUSTabBarViewControllerTests.swift; sourceTree = ""; }; C31891C226733FD400ECE25C /* TabBarViewControllerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TabBarViewControllerTests.swift; sourceTree = ""; }; - C31FEECD26CA7F8C00DF4999 /* PreTransferViewModelTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PreTransferViewModelTests.swift; sourceTree = ""; }; - C31FEECF26CB06B500DF4999 /* TransferAmountViewModelTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TransferAmountViewModelTests.swift; sourceTree = ""; }; - C31FEED126CB06CB00DF4999 /* TransferringViewModelTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TransferringViewModelTests.swift; sourceTree = ""; }; C32142E925C97CD900BECCD0 /* TransactionCellView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TransactionCellView.swift; sourceTree = ""; }; C32142F925C988C800BECCD0 /* TransactionCellViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TransactionCellViewModel.swift; sourceTree = ""; }; - C3270B98259BF7F20073DA7B /* LitecoinCardUser.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LitecoinCardUser.swift; sourceTree = ""; }; C32DAE0625925B7E003FC978 /* Color+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Color+Extension.swift"; sourceTree = ""; }; - C32DAE9025929492003FC978 /* CardViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CardViewController.swift; sourceTree = ""; }; - C32DB42C264847FD00017D26 /* CardTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CardTests.swift; sourceTree = ""; }; C32DB42E26488CAA00017D26 /* NonUSTabBarViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NonUSTabBarViewController.swift; sourceTree = ""; }; - C32DC792259396AB00A7FDB4 /* CardViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CardViewModel.swift; sourceTree = ""; }; - C32DC79B2593971500A7FDB4 /* CardView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CardView.swift; sourceTree = ""; }; - C32DC7AB2593B5C900A7FDB4 /* AnimatedCardView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnimatedCardView.swift; sourceTree = ""; }; - C32DC7B42593B61F00A7FDB4 /* AnimatedCardViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnimatedCardViewModel.swift; sourceTree = ""; }; C339752027001BEC0071FED6 /* EmailValidation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EmailValidation.swift; sourceTree = ""; }; - C345D81425A8D52600657E30 /* LoginViewModelTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewModelTests.swift; sourceTree = ""; }; - C345D82425A8D54200657E30 /* RegistrationViewModelTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RegistrationViewModelTests.swift; sourceTree = ""; }; - C345D83625A8D57E00657E30 /* AnimatedCardViewModelTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnimatedCardViewModelTests.swift; sourceTree = ""; }; C350788727DCAAA000A50819 /* uk */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = uk; path = uk.lproj/LaunchScreen.strings; sourceTree = ""; }; C350788827DCAAA000A50819 /* uk */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = uk; path = uk.lproj/MainInterface.strings; sourceTree = ""; }; C350788927DCAAA000A50819 /* uk */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = uk; path = uk.lproj/Localizable.strings; sourceTree = ""; }; @@ -1467,7 +1414,6 @@ C350788B27DCB10700A50819 /* TextView+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "TextView+Extension.swift"; sourceTree = ""; }; C3543A26264AFE490005D17A /* LocaleChangeView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LocaleChangeView.swift; sourceTree = ""; }; C3543A28264AFE720005D17A /* LocaleChangeViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LocaleChangeViewModel.swift; sourceTree = ""; }; - C354C459258FA9C000675E0E /* MainTabBarViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainTabBarViewModel.swift; sourceTree = ""; }; C354C4622590059500675E0E /* TransactionsViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TransactionsViewModel.swift; sourceTree = ""; }; C35ABD222574070A002BB9BB /* PartnersView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PartnersView.swift; sourceTree = ""; }; C35ABD322574073F002BB9BB /* PartnersViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PartnersViewModel.swift; sourceTree = ""; }; @@ -1476,44 +1422,26 @@ C36375A428BD390C00CFB3D8 /* SendButtonView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SendButtonView.swift; sourceTree = ""; }; C36DBF5E28F18D2C00FBCB24 /* LocalWebView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LocalWebView.swift; sourceTree = ""; }; C36DBF6028F1988900FBCB24 /* LocalWebViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LocalWebViewModel.swift; sourceTree = ""; }; - C377519826B09A3400E1FB12 /* TransferringView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TransferringView.swift; sourceTree = ""; }; - C377519A26B0A3D900E1FB12 /* TransferringViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TransferringViewModel.swift; sourceTree = ""; }; - C379F227259B9BF000B25883 /* RegistrationAlertView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RegistrationAlertView.swift; sourceTree = ""; }; - C38CFE8226B9250300FC6258 /* CardIconView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CardIconView.swift; sourceTree = ""; }; C39443F8269DDAD3002703E9 /* LitewalletIconView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LitewalletIconView.swift; sourceTree = ""; }; C39A71462608CB4300E7B640 /* EmptyTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EmptyTableViewCell.swift; sourceTree = ""; }; C3A4647C259A646A00D74D81 /* DataValidation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DataValidation.swift; sourceTree = ""; }; C3ACF2DE25DED601008671D4 /* CHANGELOG.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = CHANGELOG.md; sourceTree = ""; }; C3B7C3B8255EABBF00E98A64 /* SupportSafariViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SupportSafariViewModel.swift; sourceTree = ""; }; C3B7C3ED255FF59200E98A64 /* ConstantsTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConstantsTests.swift; sourceTree = ""; }; - C3BD49B62595420A00D97079 /* RegistrationViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RegistrationViewModel.swift; sourceTree = ""; }; - C3BD49BF2595423400D97079 /* RegistrationView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RegistrationView.swift; sourceTree = ""; }; C3BD49C825954A1B00D97079 /* ForgotView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ForgotView.swift; sourceTree = ""; }; - C3BD49D125954A3200D97079 /* ForgotViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ForgotViewModel.swift; sourceTree = ""; }; - C3BD4A492597542700D97079 /* LoginCardAlertView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginCardAlertView.swift; sourceTree = ""; }; C3BD4A5225975C6000D97079 /* View+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "View+Extension.swift"; sourceTree = ""; }; - C3BD4A692597E1E900D97079 /* CardLoggedInView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CardLoggedInView.swift; sourceTree = ""; }; C3BDB42626CC028F004DAE77 /* tr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = tr; path = tr.lproj/BIP39Words.plist; sourceTree = ""; }; C3BDB42726CC028F004DAE77 /* tr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = tr; path = tr.lproj/MainInterface.strings; sourceTree = ""; }; C3BDB42826CC0338004DAE77 /* tr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = tr; path = tr.lproj/Localizable.strings; sourceTree = ""; }; - C3BDB42926CDA74B004DAE77 /* CardNoTransferView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CardNoTransferView.swift; sourceTree = ""; }; - C3BF74D826114969001CE2BB /* CardWalletDetails.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CardWalletDetails.swift; sourceTree = ""; }; - C3BFD348259E31C100136837 /* LoginViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewModel.swift; sourceTree = ""; }; C3C8973725CD6B9300241FBE /* HostingTransactionCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HostingTransactionCell.swift; sourceTree = ""; }; - C3C8E1882694F204006522B7 /* PreTransferView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PreTransferView.swift; sourceTree = ""; }; - C3C8E18A2694F3B9006522B7 /* PreTransferViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PreTransferViewModel.swift; sourceTree = ""; }; C3D4379E2566EA3E00F423E1 /* LWActivityIndicator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LWActivityIndicator.swift; sourceTree = ""; }; + C3D471F6294337E700D9E415 /* CardWebViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CardWebViewController.swift; sourceTree = ""; }; C3D783A62565EA4A0004FF70 /* UnstoppableDomainView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UnstoppableDomainView.swift; sourceTree = ""; }; C3D783B62565EA6B0004FF70 /* UnstoppableDomainViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UnstoppableDomainViewModel.swift; sourceTree = ""; }; C3D783BF2565ECF60004FF70 /* UnstoppableDomainViewModelTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UnstoppableDomainViewModelTests.swift; sourceTree = ""; }; - C3D8781D26CE602E009EF8CA /* CardTwoFactor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CardTwoFactor.swift; sourceTree = ""; }; - C3DAAE2C26C9C19600D9E18C /* Enter2FACodeViewModelTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Enter2FACodeViewModelTests.swift; sourceTree = ""; }; - C3E77C0826C2807200693E22 /* Enter2FACodeViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Enter2FACodeViewModel.swift; sourceTree = ""; }; - C3EB6C1A26C18DD500881841 /* Enter2FACodeView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Enter2FACodeView.swift; sourceTree = ""; }; C3EFA9A02650807B005C59B5 /* LockScreenHeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LockScreenHeaderView.swift; sourceTree = ""; }; C3EFA9A2265080FF005C59B5 /* LockScreenHeaderViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LockScreenHeaderViewModel.swift; sourceTree = ""; }; C3EFA9A52651A808005C59B5 /* LockScreenTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LockScreenTests.swift; sourceTree = ""; }; - C3F4A4A226A2FA1D0008B1B2 /* TransferAmountView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TransferAmountView.swift; sourceTree = SOURCE_ROOT; }; C3F4A4A426A2FB1E0008B1B2 /* TransferAmountViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TransferAmountViewModel.swift; sourceTree = ""; }; C3F7BCD925FEC6AC00694C28 /* FailedAlertView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FailedAlertView.swift; sourceTree = ""; }; C3F7BCDA25FEC6AC00694C28 /* DomainResolutionFailure.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DomainResolutionFailure.swift; sourceTree = ""; }; @@ -1522,7 +1450,6 @@ C3FDADEC28B2DB090054FC80 /* SendAddressHostingController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SendAddressHostingController.swift; sourceTree = ""; }; C3FF4D5E28AC5A5800713139 /* SendAddressCellView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SendAddressCellView.swift; sourceTree = ""; }; C3FF4D6028AC5AC100713139 /* SendAddressCellViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SendAddressCellViewModel.swift; sourceTree = ""; }; - C522A0EFFFE09BDEB17CE464 /* Pods-loafwallet.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-loafwallet.debug.xcconfig"; path = "Target Support Files/Pods-loafwallet/Pods-loafwallet.debug.xcconfig"; sourceTree = ""; }; CE03EC731EF256AC0038E3A8 /* SimpleUTXO.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = SimpleUTXO.swift; path = src/Models/SimpleUTXO.swift; sourceTree = ""; }; CE0CD1581DBFBCF5004023DA /* ModalPresenter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; name = ModalPresenter.swift; path = src/ModalPresenter.swift; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.swift; }; CE0FC0F81F72417200E7C626 /* ko */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ko; path = ko.lproj/Localizable.strings; sourceTree = ""; }; @@ -1684,9 +1611,6 @@ CEF61B111ECF52C700C7EA6A /* AmountViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; name = AmountViewController.swift; path = src/ViewControllers/AmountViewController.swift; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.swift; }; CEF61B131ED0D10000C7EA6A /* Types.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Types.swift; path = src/Models/Types.swift; sourceTree = ""; }; CEF61B151ED2056D00C7EA6A /* NumberFormatter+Additions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "NumberFormatter+Additions.swift"; path = "src/Extensions/NumberFormatter+Additions.swift"; sourceTree = ""; }; - D400132CCD8B8BACA0A5A5FA /* Pods-loafwalletTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-loafwalletTests.release.xcconfig"; path = "Target Support Files/Pods-loafwalletTests/Pods-loafwalletTests.release.xcconfig"; sourceTree = ""; }; - F3DC7DC642BA81D5406223B9 /* Pods-loafwalletTests.testnet.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-loafwalletTests.testnet.xcconfig"; path = "Target Support Files/Pods-loafwalletTests/Pods-loafwalletTests.testnet.xcconfig"; sourceTree = ""; }; - FA3BC6E618264E694EB45731 /* Pods-loafwalletTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-loafwalletTests.debug.xcconfig"; path = "Target Support Files/Pods-loafwalletTests/Pods-loafwalletTests.debug.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -1702,7 +1626,6 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - A723608E9C347E4BD3E6BCDA /* Pods_loafwalletTests.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1733,16 +1656,19 @@ buildActionMask = 2147483647; files = ( 24D91D0B2166923E0077A619 /* UserNotifications.framework in Frameworks */, + C35C1227293D47EE0009022D /* UnstoppableDomainsResolution in Frameworks */, + C35C122A293D48340009022D /* KeychainAccess in Frameworks */, 22A9A9661DF61FEE000F0016 /* WebKit.framework in Frameworks */, 22A9A9641DF61FE7000F0016 /* Security.framework in Frameworks */, 22A9A9621DF61FE0000F0016 /* SystemConfiguration.framework in Frameworks */, 22A9A9601DF61FD8000F0016 /* CoreLocation.framework in Frameworks */, 22A9A95E1DF61FD0000F0016 /* PushKit.framework in Frameworks */, 223DB21B1DF69F0F0076A151 /* libbz2.framework in Frameworks */, - C30AFB4E2598FC1B00CDCF69 /* LitewalletPartnerAPI in Frameworks */, + C35C1222293D464A0009022D /* FirebaseAuth in Frameworks */, 752FB04D1DF8BF4B009086FB /* sqlite3.framework in Frameworks */, + C35C1224293D464A0009022D /* FirebaseCrashlytics in Frameworks */, + C35C1220293D464A0009022D /* FirebaseAnalytics in Frameworks */, 759DA0BE1DAC36A3008CC49B /* libBRCore.a in Frameworks */, - 28444E99F1C17FA0065EBE35 /* Pods_loafwallet.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2158,7 +2084,6 @@ 24470E4323A6088700ADDA27 /* Class Tests */ = { isa = PBXGroup; children = ( - C345D81325A8D50600657E30 /* LitecoinCardTests */, 24470E4423A608A700ADDA27 /* AmountTests.swift */, 2494037523AD35C000369261 /* BuyWKWebVCTests.swift */, C3D783BF2565ECF60004FF70 /* UnstoppableDomainViewModelTests.swift */, @@ -2171,9 +2096,7 @@ 2465873723A5AAD100A32E9E /* loafwalletTests */ = { isa = PBXGroup; children = ( - C3DAAE2B26C9C15A00D9E18C /* Two Factor Auth Tests */, C3EFA9A42651A7C4005C59B5 /* Lock Screen Tests */, - C32DB42B264847D500017D26 /* Card Tests */, C3188E3126445E5E0008ADD1 /* File Tests */, C3B7C3EC255FF56100E98A64 /* Constants Tests */, 24470E3923A5FF5700ADDA27 /* TestHelpers.swift */, @@ -2949,7 +2872,6 @@ 75B6F52F1DA71DCC0031A93F /* Modules */, 75A2A7F11DA5935F00A983D8 /* Frameworks */, 75A2A7911DA5934300A983D8 /* Products */, - FEE036865998B9DFEEF3139A /* Pods */, ); sourceTree = ""; }; @@ -3023,8 +2945,6 @@ children = ( 24D91D0A2166923E0077A619 /* UserNotifications.framework */, 22A9A9671DF61FF8000F0016 /* libbz2.tbd */, - 1BA74B86206AD60A0083BD2A /* Crashlytics.framework */, - 1BA74B85206AD60A0083BD2A /* Fabric.framework */, 22A9A9651DF61FEE000F0016 /* WebKit.framework */, 22A9A9631DF61FE7000F0016 /* Security.framework */, 22A9A9611DF61FE0000F0016 /* SystemConfiguration.framework */, @@ -3033,8 +2953,6 @@ 75FEFD1B1DAED56E00203D3A /* libsqlite3.tbd */, 75A2A7F21DA5935F00A983D8 /* Messages.framework */, 75A2A8091DA5936F00A983D8 /* NotificationCenter.framework */, - 47013A7996D32E67CB239C06 /* Pods_loafwallet.framework */, - 3058D709119F89F54447395D /* Pods_loafwalletTests.framework */, ); name = Frameworks; sourceTree = ""; @@ -3091,7 +3009,6 @@ C32142E825C97CB900BECCD0 /* Transactions */ = { isa = PBXGroup; children = ( - C3F4A4A226A2FA1D0008B1B2 /* TransferAmountView.swift */, C32142E925C97CD900BECCD0 /* TransactionCellView.swift */, C3C8973725CD6B9300241FBE /* HostingTransactionCell.swift */, C32142F925C988C800BECCD0 /* TransactionCellViewModel.swift */, @@ -3100,37 +3017,6 @@ name = Transactions; sourceTree = ""; }; - C3270B97259BF7BE0073DA7B /* CardModels */ = { - isa = PBXGroup; - children = ( - C3270B98259BF7F20073DA7B /* LitecoinCardUser.swift */, - C3BF74D826114969001CE2BB /* CardWalletDetails.swift */, - ); - name = CardModels; - sourceTree = ""; - }; - C32DB42B264847D500017D26 /* Card Tests */ = { - isa = PBXGroup; - children = ( - C32DB42C264847FD00017D26 /* CardTests.swift */, - ); - path = "Card Tests"; - sourceTree = ""; - }; - C345D81325A8D50600657E30 /* LitecoinCardTests */ = { - isa = PBXGroup; - children = ( - C345D81425A8D52600657E30 /* LoginViewModelTests.swift */, - C308993E2616124800EE6A40 /* CardWalletTests.swift */, - C345D83625A8D57E00657E30 /* AnimatedCardViewModelTests.swift */, - C345D82425A8D54200657E30 /* RegistrationViewModelTests.swift */, - C31FEECD26CA7F8C00DF4999 /* PreTransferViewModelTests.swift */, - C31FEECF26CB06B500DF4999 /* TransferAmountViewModelTests.swift */, - C31FEED126CB06CB00DF4999 /* TransferringViewModelTests.swift */, - ); - path = LitecoinCardTests; - sourceTree = ""; - }; C3543A25264AFE190005D17A /* Settings */ = { isa = PBXGroup; children = ( @@ -3147,8 +3033,6 @@ C3543A25264AFE190005D17A /* Settings */, C3F7BCD825FEC69B00694C28 /* Alerts */, C32142E825C97CB900BECCD0 /* Transactions */, - C3BD4A692597E1E900D97079 /* CardLoggedInView.swift */, - C3BDB42926CDA74B004DAE77 /* CardNoTransferView.swift */, C35ABD08257404D2002BB9BB /* Partners */, C35ABD0925740518002BB9BB /* About */, C3D783A52565EA1E0004FF70 /* Unstoppable */, @@ -3157,8 +3041,6 @@ C30029EA25D019BC00F08C2B /* CopyButtonView.swift */, C3EFA9A02650807B005C59B5 /* LockScreenHeaderView.swift */, C3EFA9A2265080FF005C59B5 /* LockScreenHeaderViewModel.swift */, - C377519826B09A3400E1FB12 /* TransferringView.swift */, - C3D8781D26CE602E009EF8CA /* CardTwoFactor.swift */, C350788B27DCB10700A50819 /* TextView+Extension.swift */, ); name = "SwiftUI+UIKit"; @@ -3197,14 +3079,6 @@ name = Unstoppable; sourceTree = ""; }; - C3DAAE2B26C9C15A00D9E18C /* Two Factor Auth Tests */ = { - isa = PBXGroup; - children = ( - C3DAAE2C26C9C19600D9E18C /* Enter2FACodeViewModelTests.swift */, - ); - path = "Two Factor Auth Tests"; - sourceTree = ""; - }; C3EFA9A42651A7C4005C59B5 /* Lock Screen Tests */ = { isa = PBXGroup; children = ( @@ -3264,7 +3138,6 @@ 24C516502158820E007CE038 /* Buy */, CE760ED71E55F9E000EFAC2B /* SecurityCenter */, CE20C9061DBC587200C8397A /* StartViewController.swift */, - C32DAE9025929492003FC978 /* CardViewController.swift */, 2494038023AF208F00369261 /* PromptModalViewController.swift */, CEAA9E981DC262800066731D /* ConfirmPaperPhraseViewController.swift */, CEF3E8351DE60222007C0A9E /* ModalNavigationController.swift */, @@ -3273,6 +3146,7 @@ CEEC708B1E95461A00EF788E /* AboutViewController.swift */, CEEC708F1E95D5C100EF788E /* PushNotificationsViewController.swift */, CEEC70931E96A24F00EF788E /* DefaultCurrencyViewController.swift */, + C3D471F6294337E700D9E415 /* CardWebViewController.swift */, CE4DFB2B1E9BE5880014009E /* ReScanViewController.swift */, CE4DFB2D1E9C26DA0014009E /* ShareDataViewController.swift */, CEEE92F01EBA7CBA00B7AC9C /* RequestAmountViewController.swift */, @@ -3354,9 +3228,6 @@ children = ( 24BA90C52410129E001E3825 /* FeeSelectorView.swift */, C39443F8269DDAD3002703E9 /* LitewalletIconView.swift */, - C38CFE8226B9250300FC6258 /* CardIconView.swift */, - C3C8E1882694F204006522B7 /* PreTransferView.swift */, - C32DC7AB2593B5C900A7FDB4 /* AnimatedCardView.swift */, CE6BCF5C1EE9E89A0029849C /* CustomTitleView.swift */, CED341321EF5A5C00014912A /* InAppAlert.swift */, CE3645461E7B40280079D0CF /* PinPadCells */, @@ -3365,12 +3236,10 @@ CEF3E8301DE554F1007C0A9E /* AnimatedIcons */, CEC6AA471DEFCFCD00EE5AFD /* Controls */, CE20C9101DBE5B6F00C8397A /* Circle.swift */, - C3BD4A492597542700D97079 /* LoginCardAlertView.swift */, CEF3E82A1DE51612007C0A9E /* GradientCircle.swift */, CEAA9E961DC18E1F0066731D /* PhraseView.swift */, CEAA9E9A1DC2B9320066731D /* ConfirmPhrase.swift */, CEAA9EA71DC3342E0066731D /* PinView.swift */, - C379F227259B9BF000B25883 /* RegistrationAlertView.swift */, CEBF32ED1DDBC30000348FC6 /* ShadowButton.swift */, CEF3E82C1DE528BF007C0A9E /* AlertView.swift */, CEF3E82E1DE534C5007C0A9E /* GradientView.swift */, @@ -3395,11 +3264,8 @@ CE5E6C931EB7964900A476DB /* WalletDisabledView.swift */, CE8F0AE21EB91BB500AA7642 /* SearchHeaderView.swift */, CE4C1CC51ED65D830063E184 /* DrawableCircle.swift */, - C3BD49BF2595423400D97079 /* RegistrationView.swift */, CEBF292D1EF99E55005C330A /* LightWeightAlert.swift */, 2494037C23AE0C7100369261 /* SyncProgressHeaderView.swift */, - C32DC79B2593971500A7FDB4 /* CardView.swift */, - C3EB6C1A26C18DD500881841 /* Enter2FACodeView.swift */, C36DBF5E28F18D2C00FBCB24 /* LocalWebView.swift */, C36DBF6028F1988900FBCB24 /* LocalWebViewModel.swift */, ); @@ -3426,14 +3292,12 @@ CE6D0E5A1E14BF8400137DF1 /* Models */ = { isa = PBXGroup; children = ( - C3270B97259BF7BE0073DA7B /* CardModels */, CE20C8FF1DBBFFDD00C8397A /* SimpleRedux */, CE6D0E5B1E14BFA600137DF1 /* KeyboardNotificationInfo.swift */, CEE65DEF1E39056F0002994D /* Rate.swift */, 24016D8F23F913C1006A6791 /* LWAnalytics.swift */, CEEC70821E90C07C00EF788E /* Setting.swift */, C339752027001BEC0071FED6 /* EmailValidation.swift */, - C30AFB632598FFB200CDCF69 /* PartnerAPIManager.swift */, CEF61B131ED0D10000C7EA6A /* Types.swift */, C3A4647C259A646A00D74D81 /* DataValidation.swift */, CE03EC731EF256AC0038E3A8 /* SimpleUTXO.swift */, @@ -3505,20 +3369,11 @@ isa = PBXGroup; children = ( C3B7C3B8255EABBF00E98A64 /* SupportSafariViewModel.swift */, - C3E77C0826C2807200693E22 /* Enter2FACodeViewModel.swift */, C3F4A4A426A2FB1E0008B1B2 /* TransferAmountViewModel.swift */, - C3BD49D125954A3200D97079 /* ForgotViewModel.swift */, - C3BD49B62595420A00D97079 /* RegistrationViewModel.swift */, - C32DC792259396AB00A7FDB4 /* CardViewModel.swift */, - C354C459258FA9C000675E0E /* MainTabBarViewModel.swift */, CEBF33031DDE17A600348FC6 /* Transaction.swift */, CE27F9581E2C8EA300F7F7F2 /* Amount.swift */, CE124CF71E67A8E500DFA146 /* TransactionDirection.swift */, C354C4622590059500675E0E /* TransactionsViewModel.swift */, - C32DC7B42593B61F00A7FDB4 /* AnimatedCardViewModel.swift */, - C3BFD348259E31C100136837 /* LoginViewModel.swift */, - C3C8E18A2694F3B9006522B7 /* PreTransferViewModel.swift */, - C377519A26B0A3D900E1FB12 /* TransferringViewModel.swift */, ); name = ViewModels; sourceTree = ""; @@ -3582,19 +3437,6 @@ name = AnimatedIcons; sourceTree = ""; }; - FEE036865998B9DFEEF3139A /* Pods */ = { - isa = PBXGroup; - children = ( - C522A0EFFFE09BDEB17CE464 /* Pods-loafwallet.debug.xcconfig */, - 088CD65386992FF5DD0B654B /* Pods-loafwallet.testnet.xcconfig */, - 6C3B4621CCAC54A4057653A5 /* Pods-loafwallet.release.xcconfig */, - FA3BC6E618264E694EB45731 /* Pods-loafwalletTests.debug.xcconfig */, - F3DC7DC642BA81D5406223B9 /* Pods-loafwalletTests.testnet.xcconfig */, - D400132CCD8B8BACA0A5A5FA /* Pods-loafwalletTests.release.xcconfig */, - ); - path = Pods; - sourceTree = ""; - }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ @@ -3654,7 +3496,6 @@ isa = PBXNativeTarget; buildConfigurationList = 2465873D23A5AAD100A32E9E /* Build configuration list for PBXNativeTarget "loafwalletTests" */; buildPhases = ( - FB5490DB6900F5BD226EF9DF /* [CP] Check Pods Manifest.lock */, 2465873223A5AAD000A32E9E /* Sources */, 2465873323A5AAD000A32E9E /* Frameworks */, 2465873423A5AAD000A32E9E /* Resources */, @@ -3727,7 +3568,6 @@ isa = PBXNativeTarget; buildConfigurationList = 75A2A7E31DA5934400A983D8 /* Build configuration list for PBXNativeTarget "loafwallet" */; buildPhases = ( - 825805FFD443BACDA18265D0 /* [CP] Check Pods Manifest.lock */, 2430679A238F538C00EBEA99 /* Update Localizable using BartyCrouch */, 583FE8702927ED5A009A6384 /* Run SwiftFormat */, 58A9FE4829191E4700B75825 /* Check for unused code */, @@ -3738,7 +3578,6 @@ 22A9A9831DF63288000F0016 /* Embed Frameworks */, C3A3FFB526FE46E8000FE955 /* Mark Dev Notes */, 58A9FE4C291BC37400B75825 /* Count number of swift lines */, - A8B781CCE67F374858723014 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -3750,7 +3589,11 @@ ); name = loafwallet; packageProductDependencies = ( - C30AFB4D2598FC1B00CDCF69 /* LitewalletPartnerAPI */, + C35C121F293D464A0009022D /* FirebaseAnalytics */, + C35C1221293D464A0009022D /* FirebaseAuth */, + C35C1223293D464A0009022D /* FirebaseCrashlytics */, + C35C1226293D47EE0009022D /* UnstoppableDomainsResolution */, + C35C1229293D48340009022D /* KeychainAccess */, ); productName = breadwallet; productReference = 75A2A7901DA5934300A983D8 /* Litewallet.app */; @@ -3881,7 +3724,9 @@ ); mainGroup = 75A2A7871DA5934300A983D8; packageReferences = ( - C30AFB4C2598FC1B00CDCF69 /* XCRemoteSwiftPackageReference "LitewalletPartnerAPI" */, + C35C121E293D464A0009022D /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */, + C35C1225293D47EE0009022D /* XCRemoteSwiftPackageReference "resolution-swift" */, + C35C1228293D48330009022D /* XCRemoteSwiftPackageReference "KeychainAccess" */, ); productRefGroup = 75A2A7911DA5934300A983D8 /* Products */; projectDirPath = ""; @@ -4039,46 +3884,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "# Type a script or drag a script file from your workspace to insert its path.\necho \"Total number of swift lines\\n------------------\" && find . -path ./Pods -prune -o -name '*.swift' -print0 ! -name '/Pods' | xargs -0 wc -l | grep \"total\"\n"; - }; - 825805FFD443BACDA18265D0 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-loafwallet-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; - }; - A8B781CCE67F374858723014 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-loafwallet/Pods-loafwallet-frameworks-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Embed Pods Frameworks"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-loafwallet/Pods-loafwallet-frameworks-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-loafwallet/Pods-loafwallet-frameworks.sh\"\n"; - showEnvVarsInLog = 0; + shellScript = "# Type a script or drag a script file from your workspace to insert its path.\necho \"Total number of swift lines\\n------------------\" && find . -name '*.swift' -print0 | xargs -0 wc -l | grep \"total\"\n"; }; C3A3FFB526FE46E8000FE955 /* Mark Dev Notes */ = { isa = PBXShellScriptBuildPhase; @@ -4098,28 +3904,6 @@ shellPath = /bin/sh; shellScript = "# http://www.benzado.com/blog/post/329/make-xcode-nag-you-about-unfinished-todos\necho \"make-xcode-nag-you-about-unfinished-todos for swift files only\"\nKEYWORDS=\"DEV:|TODO:|FIXME:|\\?\\?\\?:|\\!\\!\\!:\"\nfind \"${SRCROOT}\" \\( -name \"*.swift\" \\) -print0 | \\\nxargs -0 egrep --with-filename --line-number --only-matching \"($KEYWORDS).*\\$\" | \\\nperl -p -e \"s/($KEYWORDS)/ warning: \\$1/\"\n"; }; - FB5490DB6900F5BD226EF9DF /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-loafwalletTests-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; - }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -4134,11 +3918,9 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - C31FEED026CB06B500DF4999 /* TransferAmountViewModelTests.swift in Sources */, C3188E3326445EA20008ADD1 /* FileTests.swift in Sources */, 24470E4223A6007200ADDA27 /* WalletInfoTest.swift in Sources */, 24470E2123A5DA9700ADDA27 /* APIManagerTests.swift in Sources */, - C32DB42D264847FD00017D26 /* CardTests.swift in Sources */, 24470E3423A5F5E600ADDA27 /* PaymentRequestTests.swift in Sources */, 24470E2E23A5F4FF00ADDA27 /* BRCoderTests.swift in Sources */, 2494037623AD35C000369261 /* BuyWKWebVCTests.swift in Sources */, @@ -4150,18 +3932,11 @@ 24470E3E23A6000900ADDA27 /* WalletAuthenticationTests.swift in Sources */, 24470E2A23A5F33000ADDA27 /* BRReplicatedKVStoreTests.swift in Sources */, C3D783C02565ECF60004FF70 /* UnstoppableDomainViewModelTests.swift in Sources */, - C345D81525A8D52600657E30 /* LoginViewModelTests.swift in Sources */, - C31FEED226CB06CB00DF4999 /* TransferringViewModelTests.swift in Sources */, - C3DAAE2D26C9C19600D9E18C /* Enter2FACodeViewModelTests.swift in Sources */, 24470E2523A5EF0D00ADDA27 /* BRAPIClientTests.swift in Sources */, C31891C326733FD400ECE25C /* TabBarViewControllerTests.swift in Sources */, 24470E3C23A5FFD700ADDA27 /* TouchIdEnabledTests.swift in Sources */, 24470E3A23A5FF5700ADDA27 /* TestHelpers.swift in Sources */, - C345D83725A8D57E00657E30 /* AnimatedCardViewModelTests.swift in Sources */, - C345D82525A8D54200657E30 /* RegistrationViewModelTests.swift in Sources */, 24470E3623A5FDE800ADDA27 /* PhraseTests.swift in Sources */, - C308993F2616124800EE6A40 /* CardWalletTests.swift in Sources */, - C31FEECE26CA7F8C00DF4999 /* PreTransferViewModelTests.swift in Sources */, C31891C1267338D300ECE25C /* NonUSTabBarViewControllerTests.swift in Sources */, 24470E4523A608A700ADDA27 /* AmountTests.swift in Sources */, C3B7C3EE255FF59200E98A64 /* ConstantsTests.swift in Sources */, @@ -4287,7 +4062,6 @@ CEBF29301EF9D76F005C330A /* Environment.swift in Sources */, C39A71472608CB4300E7B640 /* EmptyTableViewCell.swift in Sources */, CEC6AA4D1DF0741100EE5AFD /* ModalDisplayable.swift in Sources */, - C3F4A4A326A2FA1D0008B1B2 /* TransferAmountView.swift in Sources */, CEE0EF521EBD14B60018DB36 /* PinTransitioningDelegate.swift in Sources */, CE45C1FD1E7650F5002C3847 /* KVStoreCoordinator.swift in Sources */, C3A4647D259A646A00D74D81 /* DataValidation.swift in Sources */, @@ -4311,27 +4085,23 @@ C3543A29264AFE720005D17A /* LocaleChangeViewModel.swift in Sources */, CEF3E82B1DE51612007C0A9E /* GradientCircle.swift in Sources */, CE124CFE1E68F57700DFA146 /* Async.swift in Sources */, - C3C8E1892694F204006522B7 /* PreTransferView.swift in Sources */, 2218BD771E8F55430091D5E8 /* BRAPIClient+Assets.swift in Sources */, 2228734D1E916F7C0044BA15 /* BRAPIClient+Features.swift in Sources */, C316CF49261887FC00E4C09B /* UIApplication+Extension.swift in Sources */, CE8644251F2C160200033129 /* ConfirmationViewController.swift in Sources */, CEE1F5631DF13E5A00D733AD /* ModalHeaderView.swift in Sources */, CE5F21DB1E4A93A500C47B8E /* LoginTransitionDelegate.swift in Sources */, - C354C45A258FA9C000675E0E /* MainTabBarViewModel.swift in Sources */, CEE659E91F664C73001FF29D /* WelcomeViewController.swift in Sources */, 24313C8723821B8C00A83F69 /* PromptTableViewCell.swift in Sources */, 2228734F1E916FC30044BA15 /* BRAPIClient+Wallet.swift in Sources */, CEAA9EA81DC3342E0066731D /* PinView.swift in Sources */, CE1D84B61EAEB2F4002A5D7B /* UIBarButtonItem+Additions.swift in Sources */, - C3BD49C02595423400D97079 /* RegistrationView.swift in Sources */, CE4B6C1A1E219CA600CF935B /* WalletCoordinator.swift in Sources */, CE6D0E5C1E14BFA700137DF1 /* KeyboardNotificationInfo.swift in Sources */, CE20C8F21DBAF71500C8397A /* ApplicationController.swift in Sources */, C32142EA25C97CD900BECCD0 /* TransactionCellView.swift in Sources */, 1B3F74231FFB106200CCA50C /* BiometricsSettingsViewController.swift in Sources */, CEC4CF071F0C48DD00E5C82E /* StartWipeWalletViewController.swift in Sources */, - C32DC793259396AB00A7FDB4 /* CardViewModel.swift in Sources */, 7528D2981ECF655500925DBC /* PaymentProtocol.swift in Sources */, 22A9A9491DF61945000F0016 /* BRBSPatch.swift in Sources */, C3543A27264AFE490005D17A /* LocaleChangeView.swift in Sources */, @@ -4342,7 +4112,6 @@ C35ABD232574070A002BB9BB /* PartnersView.swift in Sources */, CE03EC741EF256AC0038E3A8 /* SimpleUTXO.swift in Sources */, 24016D9023F913C1006A6791 /* LWAnalytics.swift in Sources */, - C3E77C0926C2807200693E22 /* Enter2FACodeViewModel.swift in Sources */, C3C8973825CD6B9300241FBE /* HostingTransactionCell.swift in Sources */, CE124CFC1E68932C00DFA146 /* FeeManager.swift in Sources */, CEE20C381EA5B4680086F724 /* Strings.swift in Sources */, @@ -4350,7 +4119,6 @@ CE25BF8D1DF3B8A500BC67B6 /* InViewAlert.swift in Sources */, 22A9A9511DF61945000F0016 /* TxMetaData.swift in Sources */, CE8CD8E11E31976800785E02 /* LoginViewController.swift in Sources */, - C3BF74D926114969001CE2BB /* CardWalletDetails.swift in Sources */, C3F7BCDE25FEC6AD00694C28 /* AlertFailureView.swift in Sources */, CEC6AA391DEE10BA00EE5AFD /* UINavigationController+Extension.swift in Sources */, CECCE5B01E04AD7600D99448 /* DescriptionSendCell.swift in Sources */, @@ -4369,7 +4137,6 @@ 24313C922382433700A83F69 /* LFModalReceiveQRViewController.swift in Sources */, CE20C9171DBE6F2A00C8397A /* UIButton+BRWAdditions.swift in Sources */, CEAA9E931DC110E70066731D /* WritePaperPhraseViewController.swift in Sources */, - C38CFE8326B9250300FC6258 /* CardIconView.swift in Sources */, CE92F9F41DED59E80046B516 /* UIView+AnimationAdditions.swift in Sources */, 24D5F26F225A5BEA00225462 /* ContainerViewController.swift in Sources */, CEEC70941E96A24F00EF788E /* DefaultCurrencyViewController.swift in Sources */, @@ -4377,10 +4144,8 @@ CEE6282A1EA98B6D001035AA /* DispatchQueue+Additions.swift in Sources */, CEC6AA3D1DEE687000EE5AFD /* RadialGradientView.swift in Sources */, 2494038123AF208F00369261 /* PromptModalViewController.swift in Sources */, - C3C8E18B2694F3B9006522B7 /* PreTransferViewModel.swift in Sources */, CEEC70921E95DA4400EF788E /* GradientSwitch.swift in Sources */, CE0CD1591DBFBCF5004023DA /* ModalPresenter.swift in Sources */, - C30AFB642598FFB200CDCF69 /* PartnerAPIManager.swift in Sources */, CEE20C2F1EA3E5820086F724 /* BlinkingView.swift in Sources */, CEC6AA441DEFCDE900EE5AFD /* ModalViewController.swift in Sources */, C3F7BCDC25FEC6AD00694C28 /* FailedAlertView.swift in Sources */, @@ -4396,15 +4161,12 @@ C3D4379F2566EA3E00F423E1 /* LWActivityIndicator.swift in Sources */, CECCE5AE1E04AD6300D99448 /* AddressCell.swift in Sources */, CE6BCF5D1EE9E89A0029849C /* CustomTitleView.swift in Sources */, - C3BFD349259E31C100136837 /* LoginViewModel.swift in Sources */, CE83DE2A1E9EB7F600D07636 /* SendAmountCell.swift in Sources */, C3FDADED28B2DB090054FC80 /* SendAddressHostingController.swift in Sources */, CEAFC8611E5D5B0500E4FD06 /* SegmentedButton.swift in Sources */, 2427342D2381C21800E2D22F /* MainViewController.swift in Sources */, - C32DAE9125929492003FC978 /* CardViewController.swift in Sources */, 7503773D1DF57428005EB8AE /* WalletManager+Auth.swift in Sources */, CEC4CF091F0C84AB00E5C82E /* UIViewController+Alerts.swift in Sources */, - C377519B26B0A3D900E1FB12 /* TransferringViewModel.swift in Sources */, CE27F9591E2C8EA300F7F7F2 /* Amount.swift in Sources */, CE1280F61EEA855C00D27649 /* Date+Additions.swift in Sources */, C350788C27DCB10700A50819 /* TextView+Extension.swift in Sources */, @@ -4421,7 +4183,6 @@ C3F7BCDD25FEC6AD00694C28 /* DomainResolutionFailure.swift in Sources */, C339752127001BEC0071FED6 /* EmailValidation.swift in Sources */, CE5E6C941EB7964900A476DB /* WalletDisabledView.swift in Sources */, - C377519926B09A3400E1FB12 /* TransferringView.swift in Sources */, CEF3E8341DE57166007C0A9E /* AnimatableIcon.swift in Sources */, CEF61B161ED2056D00C7EA6A /* NumberFormatter+Additions.swift in Sources */, CEF3E8321DE55540007C0A9E /* CheckView.swift in Sources */, @@ -4431,9 +4192,8 @@ CEF3D2DB1E8B55C80070178E /* UISlider+Gradient.swift in Sources */, C32DAE0725925B7E003FC978 /* Color+Extension.swift in Sources */, C36DBF5F28F18D2C00FBCB24 /* LocalWebView.swift in Sources */, - C3EB6C1B26C18DD500881841 /* Enter2FACodeView.swift in Sources */, CEC6AA4B1DEFD24C00EE5AFD /* MenuButtonType.swift in Sources */, - C3BD4A6A2597E1E900D97079 /* CardLoggedInView.swift in Sources */, + C3D471F7294337E700D9E415 /* CardWebViewController.swift in Sources */, 24313C752381E73200A83F69 /* TransactionManager.swift in Sources */, CE4CA7BC1EE3649100373F11 /* BRActivityView.swift in Sources */, CEC6AA421DEFC88F00EE5AFD /* ReceiveViewController.swift in Sources */, @@ -4441,7 +4201,6 @@ CE3D4C591EF743EF0016B1C8 /* Functions.swift in Sources */, CEE20C341EA5B4550086F724 /* ArticleIds.swift in Sources */, CEE65DF01E39056F0002994D /* Rate.swift in Sources */, - C3D8781E26CE602E009EF8CA /* CardTwoFactor.swift in Sources */, CEE20C361EA5B4620086F724 /* Constants.swift in Sources */, CEC6AA461DEFCE9200EE5AFD /* MenuViewController.swift in Sources */, CEEC707F1E8D6B4100EF788E /* SettingsViewController.swift in Sources */, @@ -4458,9 +4217,7 @@ CE8F0AE31EB91BB500AA7642 /* SearchHeaderView.swift in Sources */, 22A9A9551DF61945000F0016 /* BRTar.swift in Sources */, CEAA9E971DC18E1F0066731D /* PhraseView.swift in Sources */, - C32DC7AC2593B5C900A7FDB4 /* AnimatedCardView.swift in Sources */, CEF3E82F1DE534C5007C0A9E /* GradientView.swift in Sources */, - C3BD49B72595420A00D97079 /* RegistrationViewModel.swift in Sources */, CE6D0F991DE8B75900BD4BCF /* DismissModalAnimator.swift in Sources */, C39443F9269DDAD3002703E9 /* LitewalletIconView.swift in Sources */, CE4C1CC61ED65D830063E184 /* DrawableCircle.swift in Sources */, @@ -4472,7 +4229,6 @@ CEAA9E991DC262800066731D /* ConfirmPaperPhraseViewController.swift in Sources */, 22A9A9591DF61945000F0016 /* Extensions.swift in Sources */, 24470E4723A6B6E900ADDA27 /* MockSeeds.swift in Sources */, - C32DC7B52593B61F00A7FDB4 /* AnimatedCardViewModel.swift in Sources */, CEAA9EA61DC3246F0066731D /* StartNavigationDelegate.swift in Sources */, 22A9A94B1DF61945000F0016 /* BRCoding.swift in Sources */, CEF3E8361DE60222007C0A9E /* ModalNavigationController.swift in Sources */, @@ -4482,8 +4238,6 @@ CEBF33041DDE17A600348FC6 /* Transaction.swift in Sources */, CEAA9E911DC0FDFE0066731D /* UIViewPropertyAnimator+BRWAdditions.swift in Sources */, C3EFA9A12650807B005C59B5 /* LockScreenHeaderView.swift in Sources */, - C3BD4A4A2597542700D97079 /* LoginCardAlertView.swift in Sources */, - C3BDB42A26CDA74B004DAE77 /* CardNoTransferView.swift in Sources */, CEAA9EA01DC2F9F50066731D /* UIFont+BRWAdditions.swift in Sources */, C32DB42F26488CAA00017D26 /* NonUSTabBarViewController.swift in Sources */, CEC6AA491DEFD00100EE5AFD /* MenuButton.swift in Sources */, @@ -4492,7 +4246,6 @@ 24B8FAD22162B10200A155B1 /* BuyCenterWebViewController.swift in Sources */, CE6DCC301E6666470044257B /* NonScrollingCollectionView.swift in Sources */, CE20C9011DBBFFF800C8397A /* Actions.swift in Sources */, - C3270B99259BF7F20073DA7B /* LitecoinCardUser.swift in Sources */, CE20C9191DBE7B8200C8397A /* ReduxState.swift in Sources */, CEEC70811E90C04700EF788E /* SeparatorCell.swift in Sources */, CE20C8FE1DBB133A00C8397A /* SimpleRedux.swift in Sources */, @@ -4502,7 +4255,6 @@ CEEC70861E94397D00EF788E /* UserDefaults+Additions.swift in Sources */, C3F7BD0325FEC77100694C28 /* TransactionModalView.swift in Sources */, C3D783A72565EA4B0004FF70 /* UnstoppableDomainView.swift in Sources */, - C379F228259B9BF000B25883 /* RegistrationAlertView.swift in Sources */, CE3D4C571EF5D5740016B1C8 /* ReachabilityMonitor.swift in Sources */, C32142FA25C988C800BECCD0 /* TransactionCellViewModel.swift in Sources */, CE4DFB2E1E9C26DA0014009E /* ShareDataViewController.swift in Sources */, @@ -4511,7 +4263,6 @@ CE20C90C1DBC59E600C8397A /* StartFlowPresenter.swift in Sources */, CE20C8FC1DBB0F3A00C8397A /* UIColor+Extension.swift in Sources */, C3B7C3B9255EABBF00E98A64 /* SupportSafariViewModel.swift in Sources */, - C32DC79C2593971500A7FDB4 /* CardView.swift in Sources */, CEA3626A1E01150D0061FC0E /* CGContext+Additions.swift in Sources */, 22A9A9541DF61945000F0016 /* BRReplicatedKVStore.swift in Sources */, CE6B6B4A1E54C0CB00B31405 /* SecurityCenterCell.swift in Sources */, @@ -4523,7 +4274,6 @@ C3EFA9A3265080FF005C59B5 /* LockScreenHeaderViewModel.swift in Sources */, CE760EDD1E561DF900EFAC2B /* UpdatePinViewController.swift in Sources */, 24BA90C62410129E001E3825 /* FeeSelectorView.swift in Sources */, - C3BD49D225954A3200D97079 /* ForgotViewModel.swift in Sources */, CE9057181DFF0FA8006BA848 /* String+Additions.swift in Sources */, CED341331EF5A5C00014912A /* InAppAlert.swift in Sources */, CE47A8E01F7DA54000FF35BA /* UIScreen+Additions.swift in Sources */, @@ -4820,12 +4570,11 @@ }; 24470E0123A5BF3C00ADDA27 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = C522A0EFFFE09BDEB17CE464 /* Pods-loafwallet.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = loafwallet/loafwallet.entitlements; - CURRENT_PROJECT_VERSION = 423; + CURRENT_PROJECT_VERSION = 1586; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_TEAM = ZV7987N2ZC; "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64; @@ -4854,7 +4603,6 @@ }; 24470E0323A5BF3C00ADDA27 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = FA3BC6E618264E694EB45731 /* Pods-loafwalletTests.debug.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; BUNDLE_LOADER = "$(TEST_HOST)"; @@ -4933,7 +4681,7 @@ CODE_SIGN_ENTITLEMENTS = TodayExtension/TodayExtension.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 423; + CURRENT_PROJECT_VERSION = 1586; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_TEAM = ZV7987N2ZC; INFOPLIST_FILE = TodayExtension/Info.plist; @@ -5062,7 +4810,6 @@ }; 2465873F23A5AAD100A32E9E /* Testnet */ = { isa = XCBuildConfiguration; - baseConfigurationReference = F3DC7DC642BA81D5406223B9 /* Pods-loafwalletTests.testnet.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; @@ -5090,7 +4837,6 @@ }; 2465874023A5AAD100A32E9E /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = D400132CCD8B8BACA0A5A5FA /* Pods-loafwalletTests.release.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; @@ -5240,12 +4986,11 @@ }; 75A2A7E51DA5934400A983D8 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 6C3B4621CCAC54A4057653A5 /* Pods-loafwallet.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = loafwallet/loafwallet.entitlements; - CURRENT_PROJECT_VERSION = 423; + CURRENT_PROJECT_VERSION = 1586; DEVELOPMENT_TEAM = ZV7987N2ZC; "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64; FRAMEWORK_SEARCH_PATHS = ( @@ -5276,7 +5021,7 @@ CODE_SIGN_ENTITLEMENTS = TodayExtension/TodayExtension.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 423; + CURRENT_PROJECT_VERSION = 1586; DEVELOPMENT_TEAM = ZV7987N2ZC; INFOPLIST_FILE = TodayExtension/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 14.0; @@ -5372,12 +5117,11 @@ }; CEA7E69C1F0AAA84001F8C27 /* Testnet */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 088CD65386992FF5DD0B654B /* Pods-loafwallet.testnet.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = loafwallet/loafwallet.entitlements; - CURRENT_PROJECT_VERSION = 423; + CURRENT_PROJECT_VERSION = 1586; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_TEAM = ZV7987N2ZC; FRAMEWORK_SEARCH_PATHS = ( @@ -5409,7 +5153,7 @@ CODE_SIGN_ENTITLEMENTS = TodayExtension/TodayExtension.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 423; + CURRENT_PROJECT_VERSION = 1586; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_TEAM = ZV7987N2ZC; INFOPLIST_FILE = TodayExtension/Info.plist; @@ -5643,21 +5387,57 @@ /* End XCConfigurationList section */ /* Begin XCRemoteSwiftPackageReference section */ - C30AFB4C2598FC1B00CDCF69 /* XCRemoteSwiftPackageReference "LitewalletPartnerAPI" */ = { + C35C121E293D464A0009022D /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/firebase/firebase-ios-sdk.git"; + requirement = { + kind = exactVersion; + version = 10.2.0; + }; + }; + C35C1225293D47EE0009022D /* XCRemoteSwiftPackageReference "resolution-swift" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/unstoppabledomains/resolution-swift"; + requirement = { + kind = upToNextMajorVersion; + minimumVersion = 4.0.0; + }; + }; + C35C1228293D48330009022D /* XCRemoteSwiftPackageReference "KeychainAccess" */ = { isa = XCRemoteSwiftPackageReference; - repositoryURL = "https://github.com/litecoin-foundation/LitewalletPartnerAPI.git"; + repositoryURL = "https://github.com/kishikawakatsumi/KeychainAccess.git"; requirement = { kind = exactVersion; - version = 0.8.1; + version = 4.2.0; }; }; /* End XCRemoteSwiftPackageReference section */ /* Begin XCSwiftPackageProductDependency section */ - C30AFB4D2598FC1B00CDCF69 /* LitewalletPartnerAPI */ = { + C35C121F293D464A0009022D /* FirebaseAnalytics */ = { + isa = XCSwiftPackageProductDependency; + package = C35C121E293D464A0009022D /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */; + productName = FirebaseAnalytics; + }; + C35C1221293D464A0009022D /* FirebaseAuth */ = { + isa = XCSwiftPackageProductDependency; + package = C35C121E293D464A0009022D /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */; + productName = FirebaseAuth; + }; + C35C1223293D464A0009022D /* FirebaseCrashlytics */ = { + isa = XCSwiftPackageProductDependency; + package = C35C121E293D464A0009022D /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */; + productName = FirebaseCrashlytics; + }; + C35C1226293D47EE0009022D /* UnstoppableDomainsResolution */ = { + isa = XCSwiftPackageProductDependency; + package = C35C1225293D47EE0009022D /* XCRemoteSwiftPackageReference "resolution-swift" */; + productName = UnstoppableDomainsResolution; + }; + C35C1229293D48340009022D /* KeychainAccess */ = { isa = XCSwiftPackageProductDependency; - package = C30AFB4C2598FC1B00CDCF69 /* XCRemoteSwiftPackageReference "LitewalletPartnerAPI" */; - productName = LitewalletPartnerAPI; + package = C35C1228293D48330009022D /* XCRemoteSwiftPackageReference "KeychainAccess" */; + productName = KeychainAccess; }; /* End XCSwiftPackageProductDependency section */ }; diff --git a/loafwallet.xcworkspace/contents.xcworkspacedata b/loafwallet.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 4cbe42f56..000000000 --- a/loafwallet.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/loafwallet.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/loafwallet.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/loafwallet.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/loafwallet/AnimatedCardView.swift b/loafwallet/AnimatedCardView.swift deleted file mode 100644 index 529b987eb..000000000 --- a/loafwallet/AnimatedCardView.swift +++ /dev/null @@ -1,56 +0,0 @@ -import SwiftUI - -struct AnimatedCardView: View { - // MARK: - Combine Variables - - @ObservedObject - var viewModel: AnimatedCardViewModel - - @State private var didDropCard = false - - @Binding - var isLoggedIn: Bool - - init(viewModel: AnimatedCardViewModel, isLoggedIn: Binding) { - _isLoggedIn = isLoggedIn - self.viewModel = viewModel - } - - var body: some View { - if isLoggedIn { - Image(viewModel.imageFront) - .resizable() - .aspectRatio(contentMode: .fit) - .onAppear { - withAnimation { - viewModel.dropOffset = 0.0 - } - } - .padding() - .shadow(color: .gray, radius: 6, x: 4, y: 4) - } else { - Image(viewModel.imageFront) - .resizable() - .aspectRatio(contentMode: .fit) - .rotation3DEffect(.degrees(viewModel.rotateIn3D ? -20 : 20), axis: (x: 0, y: 1, z: 0)) - .animation(.easeInOut(duration: 0.5)) - .offset(x: 0.0, y: CGFloat(viewModel.dropOffset)) - .onAppear { - viewModel.rotateIn3D = true - withAnimation { - viewModel.dropOffset = 0.0 - } - } - .padding() - .shadow(color: .gray, radius: 6, x: 4, y: 4) - } - } -} - -struct AnimatedCardView_Previews: PreviewProvider { - static let viewModel = AnimatedCardViewModel() - - static var previews: some View { - AnimatedCardView(viewModel: viewModel, isLoggedIn: .constant(true)) - } -} diff --git a/loafwallet/AnimatedCardViewModel.swift b/loafwallet/AnimatedCardViewModel.swift deleted file mode 100644 index 44cc08e84..000000000 --- a/loafwallet/AnimatedCardViewModel.swift +++ /dev/null @@ -1,17 +0,0 @@ -import Foundation -import UIKit - -class AnimatedCardViewModel: ObservableObject { - @Published - var rotateIn3D = false - - @Published - var isLoggedIn = false - - @Published - var imageFront = "litecoin-front-card-border" - - var dropOffset: CGFloat = -200.0 - - init() {} -} diff --git a/loafwallet/BuyTableViewController.swift b/loafwallet/BuyTableViewController.swift index dd2bbdd43..4523c55fc 100644 --- a/loafwallet/BuyTableViewController.swift +++ b/loafwallet/BuyTableViewController.swift @@ -8,7 +8,6 @@ class BuyTableViewController: UITableViewController, SFSafariViewControllerDeleg @IBOutlet var bitrefillHeaderLabel: UILabel! @IBOutlet var bitrefillDetailsLabel: UILabel! @IBOutlet var bitrefillCellContainerView: UIView! - @IBAction func didTapBitrefill(_: UIButton) { guard let url = URL(string: "https://www.bitrefill.com/?ref=bAshL935") else { diff --git a/loafwallet/CardIconView.swift b/loafwallet/CardIconView.swift deleted file mode 100644 index f796073aa..000000000 --- a/loafwallet/CardIconView.swift +++ /dev/null @@ -1,21 +0,0 @@ -import SwiftUI - -struct CardIconView: View { - var body: some View { - Image("litecoin-front-card-border") - .resizable() - .aspectRatio(contentMode: .fit) - .frame(width: 110, - height: 72, - alignment: - .center) - .contrast(0.95) - .shadow(radius: 1.0, x: 2.0, y: 2.0) - } -} - -struct CardIconView_Previews: PreviewProvider { - static var previews: some View { - CardIconView() - } -} diff --git a/loafwallet/CardLoggedInView.swift b/loafwallet/CardLoggedInView.swift deleted file mode 100644 index a69fe1b3e..000000000 --- a/loafwallet/CardLoggedInView.swift +++ /dev/null @@ -1,222 +0,0 @@ -import SwiftUI - -struct CardLoggedInView: View { - // MARK: - Combine Variables - - @ObservedObject - var viewModel: CardViewModel - - @ObservedObject - var twoFactor: CardTwoFactor - - @State - private var shouldLogout: Bool = false - - @State - private var didStartTransfer: Bool = false - - @State - private var startingSliderValue: Double = 0.0 - - @State - var currentWalletType: WalletType = .litewallet - - // MARK: - Private Variables - - private var litewalletAddress: String { - guard let address = viewModel - .walletManager - .wallet? - .receiveAddress - else { - print("Card Logged In ViewModel ERROR: No address found") - return "" - } - return address - } - - private var cardBalance: Double { - return viewModel.cardWalletDetails?.availableBalance ?? 0.0 - } - - private var cardAddress: String { - return viewModel.cardWalletDetails?.ltcAddress ?? "" - } - - init(viewModel: CardViewModel, - twoFactor: CardTwoFactor) - { - self.viewModel = viewModel - - self.twoFactor = twoFactor - } - - /// RYO Paging Indicator: Listens to a state and updates the dots accordingly - /// - Returns: The dots view - private func pagingIndicatorView() -> AnyView { - return AnyView( - HStack { - Ellipse() - .fill(didStartTransfer ? - Color.litecoinGray : - .liteWalletBlue) - .frame(width: 10, - height: 10) - Ellipse() - .fill(didStartTransfer ? - Color.liteWalletBlue : - .litecoinGray) - .frame(width: 10, - height: 10) - } - .padding(.all, 10.0) - ) - } - - var body: some View { - VStack { - // Logout button - Button(action: { - shouldLogout = true - viewModel.isLoggedIn = false - NotificationCenter.default.post(name: .LitecoinCardLogoutNotification, - object: nil, - userInfo: nil) - }) { - Text(S.LitecoinCard.logout) - .frame(minWidth: 0, - maxWidth: .infinity, - alignment: .center) - .font(Font(UIFont.barlowLight(size: 19.0))) - .foregroundColor(Color.liteWalletBlue) - .padding(.all, 15.0) - } - - Divider() - - if twoFactor.isEnabled { - // Sets phase 1 or 2 of transfer - if didStartTransfer { - // Transfer Amount Subview - Group { - Text(S.LitecoinCard.Transfer.setAmount + ": ") - .frame(minWidth: 0, - maxWidth: .infinity, - alignment: .center) - .font(Font(UIFont.barlowSemiBold(size: 20.0))) - .foregroundColor(Color(UIColor.liteWalletBlue)) - .padding([.top, .leading, .trailing], 5.0) - .padding(.bottom, 2.0) - - VStack { - TransferAmountView(viewModel: - TransferAmountViewModel(walletType: currentWalletType, - litewalletBalance: viewModel.litewalletBalance, - litewalletAddress: litewalletAddress, - cardBalance: cardBalance, - cardAddress: cardAddress, - walletManager: viewModel.walletManager, - store: viewModel.store), - sliderValue: $startingSliderValue, - shouldShow: $didStartTransfer) - Spacer() - } - .padding(.top, 10.0) - } - .transition(.move(edge: .trailing)) - .animation(.easeInOut(duration: 0.5)) - } else { - // PreTransfer Subview - Group { - // Top description - Text(S.LitecoinCard.Transfer.description) - .frame(minWidth: 0, - maxWidth: .infinity, - alignment: .center) - .font(Font(UIFont.barlowSemiBold(size: 20.0))) - .foregroundColor(Color(UIColor.liteWalletBlue)) - .padding([.top, .leading, .trailing], 5.0) - .padding(.bottom, 2.0) - - VStack { - Spacer() - - // Litewallet balance view - PreTransferView(walletBalance: viewModel.litewalletBalance, - parentWalletType: $currentWalletType, - localWalletType: .litewallet, - wasTapped: $didStartTransfer, - twoFactorEnabled: twoFactor.isEnabled).padding(.bottom, 10.0) - - // Litecoin Card balance view - // DEV: Need to get information back from Ternio - // Currently, to withdraw call requires 2FA *again* after logging in - // This currently causes an 403 - // When Ternio provide a good process, we will add it. - PreTransferView(walletBalance: cardBalance, - parentWalletType: $currentWalletType, - localWalletType: .litecoinCard, - wasTapped: $didStartTransfer, - twoFactorEnabled: false // twoFactor.isEnabled - See DEV Note. - ).padding(.top, 10.0) - - Spacer() - } - .padding(.top, 10.0) - } - .transition(.move(edge: .leading)) - .animation(.easeInOut(duration: 0.5)) - } - - Spacer() - - pagingIndicatorView() - .padding() - } else { - // Shown when the user does not have 2FA Enabled - Group { - VStack { - Spacer() - - // Card No Transfer view - CardNoTransferView(viewModel: viewModel) - .padding(.bottom, 10.0) - - Spacer() - } - } - .transition(.move(edge: .leading)) - .animation(.easeInOut(duration: 0.5)) - } - } - } -} - -struct CardLoggedInView_Previews: PreviewProvider { - static let amount100 = MockSeeds.amount100 - - static let walletManager = MockSeeds.walletManager - - static let store = Store() - - static let viewModel = CardViewModel(walletManager: walletManager, - store: store) - - static let twoFactor = CardTwoFactor() - - static var previews: some View { - Group { - CardLoggedInView(viewModel: viewModel, twoFactor: twoFactor) - .previewDevice(PreviewDevice(rawValue: DeviceType.Name.iPhoneSE2)) - .previewDisplayName(DeviceType.Name.iPhoneSE2) - - CardLoggedInView(viewModel: viewModel, twoFactor: twoFactor) - .previewDevice(PreviewDevice(rawValue: DeviceType.Name.iPhone8)) - .previewDisplayName(DeviceType.Name.iPhone8) - - CardLoggedInView(viewModel: viewModel, twoFactor: twoFactor) - .previewDevice(PreviewDevice(rawValue: DeviceType.Name.iPhone12ProMax)) - .previewDisplayName(DeviceType.Name.iPhone12ProMax) - } - } -} diff --git a/loafwallet/CardNoTransferView.swift b/loafwallet/CardNoTransferView.swift deleted file mode 100644 index e49e23848..000000000 --- a/loafwallet/CardNoTransferView.swift +++ /dev/null @@ -1,90 +0,0 @@ -import SwiftUI - -struct CardNoTransferView: View { - // MARK: - Combine Variables - - @ObservedObject - var viewModel: CardViewModel - - @State - private var shouldLogout: Bool = false - - // MARK: - Private Variables - - private var cardBalance: Double { - return viewModel.cardWalletDetails?.availableBalance ?? 0.0 - } - - init(viewModel: CardViewModel) { - self.viewModel = viewModel - } - - var body: some View { - VStack { - // CardNoTransfer Subview - Group { - // Top description - Text(S.LitecoinCard.cardBalance.localizedUppercase) - .frame(minWidth: 0, - maxWidth: .infinity, - alignment: .center) - .font(Font(UIFont.barlowBold(size: 20.0))) - .foregroundColor(Color(UIColor.liteWalletBlue)) - .padding([.top, .leading, .trailing], 30.0) - .padding(.bottom, 20.0) - - VStack { - // Litecoin Card Wallet balance - PreTransferView(walletBalance: viewModel.cardWalletDetails?.availableBalance ?? 0.0, - parentWalletType: .constant(.litecoinCard), - localWalletType: .litecoinCard, - wasTapped: .constant(false), - twoFactorEnabled: false) - - // 2FA description - Text(S.LitecoinCard.cardBalanceOnlyDescription) - .frame(minWidth: 0, - maxWidth: .infinity, - alignment: .center) - .font(Font(UIFont.barlowLight(size: 17.0))) - .foregroundColor(Color(UIColor.liteWalletBlue)) - .padding([.top, .leading, .trailing], 30.0) - - Spacer() - } - .padding(.top, 10.0) - } - .transition(.move(edge: .leading)) - .animation(.easeInOut(duration: 0.5)) - - Spacer() - } - } -} - -struct CardNoTransferView_Previews: PreviewProvider { - static let amount100 = MockSeeds.amount100 - - static let walletManager = MockSeeds.walletManager - - static let store = Store() - - static let viewModel = CardViewModel(walletManager: walletManager, - store: store) - - static var previews: some View { - Group { - CardNoTransferView(viewModel: viewModel) - .previewDevice(PreviewDevice(rawValue: DeviceType.Name.iPhoneSE2)) - .previewDisplayName(DeviceType.Name.iPhoneSE2) - - CardNoTransferView(viewModel: viewModel) - .previewDevice(PreviewDevice(rawValue: DeviceType.Name.iPhone8)) - .previewDisplayName(DeviceType.Name.iPhone8) - - CardNoTransferView(viewModel: viewModel) - .previewDevice(PreviewDevice(rawValue: DeviceType.Name.iPhone12ProMax)) - .previewDisplayName(DeviceType.Name.iPhone12ProMax) - } - } -} diff --git a/loafwallet/CardTwoFactor.swift b/loafwallet/CardTwoFactor.swift deleted file mode 100644 index 4d9fd2c7b..000000000 --- a/loafwallet/CardTwoFactor.swift +++ /dev/null @@ -1,82 +0,0 @@ -import Foundation -import KeychainAccess - -class CardTwoFactor: ObservableObject { - // MARK: - Combine Variables - - @Published - var isEnabled: Bool = true { - didSet { - // Using the Bool > Int > String as a quick hack - // since the Keychain Access framework doesnt have a bool value - - let keychainStatus = keychain["shouldEnable2FA"] - - if isEnabled { - if keychainStatus == "0" { - keychain["shouldEnable2FA"] = "1" - - update2FAPreference() - } - } else { - if keychainStatus == "1" { - keychain["shouldEnable2FA"] = "0" - - update2FAPreference() - } - } - } - } - - @Published - var errorMessage: String = "" - - @Published - var errorOccured: Bool = false - - // MARK: - Private Variables - - private let keychain = Keychain(service: "com.litecoincard.service") - - init() { - fetchUsers2FAStatus() - } - - // Fetches the status from the keychain - private func fetchUsers2FAStatus() { - if let shouldEnable = (keychain["shouldEnable2FA"] as - NSString?)?.boolValue - { - isEnabled = shouldEnable - } - } - - // Update users 2FA preference to backend - private func update2FAPreference() { - if let userID = keychain["userID"], - let token = keychain["token"] - { - PartnerAPI.shared.enable2FA(userID: userID, - token: token, - shouldEnable: isEnabled) { responseDict in - if let response = responseDict?["response"] as? [String: Any], - let code = response["code"] as? Int, - code == 200 - { - LWAnalytics.logEventWithParameters(itemName: ._20210804_TAA2FAC) - } else if let code = responseDict?["code"] as? String, - let status = responseDict?["status"] as? Int, - code == "invalid_token", - status == 401 - { - self.errorMessage = S.Fragments.sorry + "" + S.LitecoinCard.twoFAErrorMessage - - self.errorOccured = true - - LWAnalytics.logEventWithParameters(itemName: ._20200112_ERR, - properties: ["error": "ERROR: Unauthorized Error - jwt expired, invalid_token"]) - } - } - } - } -} diff --git a/loafwallet/CardView.swift b/loafwallet/CardView.swift deleted file mode 100644 index d9cd5b026..000000000 --- a/loafwallet/CardView.swift +++ /dev/null @@ -1,319 +0,0 @@ -import SwiftUI -import UIKit - -struct CardView: View { - // MARK: - Combine Variables - - @ObservedObject - var viewModel: CardViewModel - - @ObservedObject - var registrationModel = RegistrationViewModel() - - @ObservedObject - var loginModel = LoginViewModel() - - @ObservedObject - var animatedViewModel = AnimatedCardViewModel() - - @ObservedObject - var twoFAviewModel = Enter2FACodeViewModel() - - @State - private var shouldShowLoginModal: Bool = false - - @State - private var didFailToLogin: Bool = false - - @State - var didTapIForgot: Bool = false - - @State - var didShowCardView: Bool = false - - @State - var shouldShowEnable2FAModal: Bool = false - - @State - private var shouldShowRegistrationView: Bool = false - - @State - private var shouldShowPassword: Bool = false - - @State - private var forgotEmailAddressInput = "" - - @State - var didCompleteLogin: Bool = false - - @State - var isEmailValid: Bool = false - - init(viewModel: CardViewModel) { - self.viewModel = viewModel - } - - var body: some View { - GeometryReader { geometry in - VStack { - // MARK: - Animated Card View - - Group { - AnimatedCardView(viewModel: animatedViewModel, isLoggedIn: $didCompleteLogin) - .frame(minWidth: 0, - maxWidth: - didCompleteLogin ? geometry.size.width * 0.6 : - geometry.size.width * 0.7) - .padding(.all, didCompleteLogin ? 10 : 20) - } - - // MARK: - Login Textfields - - Group { - TextField(S.Receive.emailButton, - text: $loginModel.emailString) - .onReceive(loginModel.$emailString) { currentEmail in - isEmailValid = EmailValidation.isEmailValid(emailString: currentEmail) - } - .foregroundColor(EmailValidation.isEmailValid(emailString: loginModel.emailString) ? .black : Color(UIColor.litecoinOrange)) - .font(Font(UIFont.barlowSemiBold(size: 17.0))) - .accentColor(Color(UIColor.liteWalletBlue)) - .padding([.leading, .trailing], 20) - .padding(.top, 18) - .autocapitalization(.none) - .keyboardType(.emailAddress) - - Divider().padding([.leading, .trailing], 20) - - HStack { - if shouldShowPassword { - TextField(S.Import.passwordPlaceholder.capitalized, text: $loginModel.passwordString) - .foregroundColor(.black) - .font(Font(UIFont.barlowSemiBold(size: 17.0))) - .accentColor(Color(UIColor.liteWalletBlue)) - .padding(.leading, 20) - .padding(.top, 18) - .autocapitalization(.none) - .keyboardType(.asciiCapable) - } else { - SecureField(S.Import.passwordPlaceholder.capitalized, text: $loginModel.passwordString) - .foregroundColor(.black) - .font(Font(UIFont.barlowSemiBold(size: 17.0))) - .accentColor(Color(UIColor.liteWalletBlue)) - .padding(.leading, 20) - .padding(.top, 15) - .autocapitalization(.none) - .keyboardType(.asciiCapable) - } - - Spacer() - Button(action: { - shouldShowPassword.toggle() - }) { - Image(systemName: shouldShowPassword ? "eye.fill" : "eye.slash.fill") - .padding(.top, 15) - .padding(.trailing, 20) - .foregroundColor(.gray) - } - } - - Divider().padding([.leading, .trailing], 20) - Spacer() - - HStack { - Toggle(viewModel.cardTwoFactor.isEnabled ? S.LitecoinCard.twoFAOn : S.LitecoinCard.twoFAOff, - isOn: $viewModel.cardTwoFactor.isEnabled) - .foregroundColor(.gray) - .font(Font(UIFont.barlowRegular(size: 16.0))) - .padding([.leading, .trailing], 20) - .padding(.top, 10) - // DEV: 2FA Alert Work Around - // This error could happen if the user toggles the 2FA without logging in. - // The problem is they lose the token over time. - // Toggling 2FA on and entering the code fixes the problem. - // There are analytical events to see how prevalent this issue is. - // It may need to be refactored if it is a growing concern - .alert(isPresented: $viewModel.cardTwoFactor.errorOccured) { - Alert( - title: Text(S.Fragments.sorry.localizedCapitalized + "!"), - message: Text(S.LitecoinCard.twoFAErrorMessage), - dismissButton: .default(Text(S.Button.ok)) { - viewModel.cardTwoFactor.errorOccured = false - } - ) - } - } - - // MARK: - Action Buttons - - Group { - // Forgot password button - Button(action: { - didTapIForgot = true - }) { - Text(S.LitecoinCard.forgotPassword) - .frame(minWidth: 0, maxWidth: .infinity) - .font(Font(UIFont.barlowLight(size: 15))) - .foregroundColor(Color(UIColor.liteWalletBlue)) - .padding(.all, 15) - } - - Spacer(minLength: 5) - - // Login button - Button(action: { - // Description - // There is a two step process here: - // 1. Check if the user wants 2FA - // 2. Make discardable loginUser Call - // 3. Make loginUser again with the token - - if viewModel.cardTwoFactor.isEnabled { - // Discardable result API sends Code to email - loginModel.login { _ in } - - // Shows the 2FA Modal - shouldShowEnable2FAModal = true - } else { - // Shows the Login Modal - shouldShowLoginModal = true - - // Login without 2FA - loginModel.login { didLogin in - if didLogin { - viewModel.isLoggedIn = true - shouldShowLoginModal = false - NotificationCenter.default.post(name: .LitecoinCardLoginNotification, - object: nil, - userInfo: nil) - } else { - viewModel.isLoggedIn = true - didFailToLogin = true - - DispatchQueue.main.asyncAfter(deadline: .now() + 4.0) { - shouldShowLoginModal = false - } - } - } - } - }) { - Text(S.LitecoinCard.login) - .frame(minWidth: 0, maxWidth: .infinity) - .padding() - .font(Font(UIFont.barlowMedium(size: 16.0))) - .padding([.leading, .trailing], 16) - .foregroundColor(.white) - .background(Color(UIColor.liteWalletBlue)) - .cornerRadius(4.0) - .overlay( - RoundedRectangle(cornerRadius: 4) - .stroke(Color(UIColor.liteWalletBlue), lineWidth: 1) - ) - } - .padding([.leading, .trailing], 16) - .disabled(loginModel.simpleCredentialsCheck()) - - // Registration button - Button(action: { - shouldShowRegistrationView = true - }) { - Text(S.LitecoinCard.registerCard) - .frame(minWidth: 0, maxWidth: .infinity) - .padding() - .font(Font(UIFont.barlowMedium(size: 15.0))) - .foregroundColor(Color(UIColor.liteWalletBlue)) - .overlay( - RoundedRectangle(cornerRadius: 4) - .stroke(Color(UIColor.liteWalletBlue), lineWidth: 1) - ) - .padding([.leading, .trailing], 16) - .padding([.top, .bottom], 10) - } - .sheet(isPresented: $shouldShowRegistrationView) { - RegistrationView(viewModel: registrationModel) - } - } - Spacer() - } - }.onReceive(NotificationCenter.default.publisher(for: NSNotification.Name.UIKeyboardWillShow)) - { _ in - animatedViewModel.dropOffset = -200 - }.onReceive(NotificationCenter.default.publisher(for: NSNotification.Name.UIKeyboardWillHide)) - { _ in - animatedViewModel.dropOffset = 0 - }.onReceive(twoFAviewModel.$tokenString, perform: { confirmedToken in - - if twoFAviewModel.didSetToken, - confirmedToken.count == 6 - { - loginModel.tokenString = confirmedToken - shouldShowLoginModal = true - - loginModel.login { didLogin in - if didLogin { - viewModel.isLoggedIn = true - shouldShowLoginModal = false - - NotificationCenter.default.post(name: .LitecoinCardLoginNotification, - object: nil, - userInfo: nil) - } else { - viewModel.isLoggedIn = true - didFailToLogin = true - - DispatchQueue.main.asyncAfter(deadline: .now() + 4.0) { - shouldShowLoginModal = false - } - } - } - } - }) - .onAppear { - didShowCardView = true - } - .animation(.easeOut) - .transition(.scale) - .forgotPasswordView(isShowingForgot: $didTapIForgot, - emailString: $forgotEmailAddressInput, - message: S.LitecoinCard.forgotPassword) - .loginAlertView(isShowingLoginAlert: $shouldShowLoginModal, - didFail: $didFailToLogin, - message: $loginModel.processMessage) - .registeredAlertView(shouldStartRegistering: $registrationModel.isRegistering, - didRegister: $registrationModel.didRegister, - data: registrationModel.dataDictionary, - message: $registrationModel.message) - .enter2FACodeView(shouldShowEnter2FAView: $shouldShowEnable2FAModal, - twoFAModel: twoFAviewModel) - .frame(minWidth: 0, - maxWidth: .infinity, - minHeight: 0, - maxHeight: .infinity, - alignment: .center) - } - } -} - -struct CardView_Previews: PreviewProvider { - static let amount100 = MockSeeds.amount100 - - static let walletManager = MockSeeds.walletManager - - static let viewModel = CardViewModel(walletManager: walletManager, store: Store()) - - static var previews: some View { - Group { - CardView(viewModel: viewModel) - .previewDevice(PreviewDevice(rawValue: DeviceType.Name.iPhoneSE2)) - .previewDisplayName(DeviceType.Name.iPhoneSE2) - - CardView(viewModel: viewModel) - .previewDevice(PreviewDevice(rawValue: DeviceType.Name.iPhone8)) - .previewDisplayName(DeviceType.Name.iPhone8) - - CardView(viewModel: viewModel) - .previewDevice(PreviewDevice(rawValue: DeviceType.Name.iPhone12ProMax)) - .previewDisplayName(DeviceType.Name.iPhone12ProMax) - } - } -} diff --git a/loafwallet/CardViewController.swift b/loafwallet/CardViewController.swift deleted file mode 100644 index 36c830c30..000000000 --- a/loafwallet/CardViewController.swift +++ /dev/null @@ -1,101 +0,0 @@ -import Foundation - -import SwiftUI -import UIKit - -/// A container for a CardView - SwiftUI -class CardViewController: UIViewController { - var viewModel: CardViewModel? - - var cardLoggedInView: CardLoggedInView? - - var cardView: CardView? - - var walletManager: WalletManager? - - var store: Store? - - var parentFrame: CGRect? - - var swiftUIContainerView = UIHostingController(rootView: AnyView(EmptyView())) - - var notificationToken: NSObjectProtocol? - - private func updateLoginStatusFromViewModel() { - guard let viewModel = viewModel - else { - NSLog("ERROR: CardViewModel not loaded") - LWAnalytics.logEventWithParameters(itemName: ._20200112_ERR) - return - } - - // Verifies the stack has only one VC and it is the UIHostingController - DispatchQueue.main.async { - if self.childViewControllers.count == 1, - (self.childViewControllers.first?.isKind(of: UIHostingController.self)) != nil - { - self.swiftUIContainerView.willMove(toParent: nil) - self.swiftUIContainerView.removeFromParentViewController() - self.swiftUIContainerView.view.removeFromSuperview() - } - - if viewModel.isLoggedIn { - self.cardLoggedInView = CardLoggedInView(viewModel: viewModel, - twoFactor: viewModel.cardTwoFactor) - self.swiftUIContainerView = UIHostingController(rootView: AnyView(self.cardLoggedInView)) - } else { - self.cardView = CardView(viewModel: viewModel) - self.swiftUIContainerView = UIHostingController(rootView: AnyView(self.cardView)) - } - - // Constraint the view to Tab container - if let size = self.parentFrame?.size { - self.swiftUIContainerView.view.frame = CGRect(origin: CGPoint(x: 0, y: 0), size: size) - } - - self.addChildViewController(self.swiftUIContainerView) - self.view.addSubview(self.swiftUIContainerView.view) - self.swiftUIContainerView.didMove(toParent: self) - } - } - - override func viewDidLoad() { - // Preparation values for the Card view model - guard let walletManager = walletManager, - let store = store - else { - LWAnalytics.logEventWithParameters(itemName: ._20200112_ERR) - - return - } - - viewModel = CardViewModel(walletManager: walletManager, - store: store) - - updateLoginStatusFromViewModel() - - // Listens for Login notification and updates the CardView - notificationToken = NotificationCenter.default - .addObserver(forName: NSNotification.Name.LitecoinCardLoginNotification, - object: nil, - queue: nil) { _ in - LWAnalytics.logEventWithParameters(itemName: ._20210804_TAULI) - - self.viewModel?.fetchCardWalletDetails { - LWAnalytics.logEventWithParameters(itemName: ._20210804_TAWDS) - } - - self.updateLoginStatusFromViewModel() - } - - // Listens for Logout notification and updates the CardView - notificationToken = NotificationCenter.default - .addObserver(forName: NSNotification.Name.LitecoinCardLogoutNotification, - object: nil, - queue: nil) { _ in - LWAnalytics.logEventWithParameters(itemName: ._20210804_TAULO) - - self.updateLoginStatusFromViewModel() - } - } -} diff --git a/loafwallet/CardViewModel.swift b/loafwallet/CardViewModel.swift deleted file mode 100644 index 41bdf8b09..000000000 --- a/loafwallet/CardViewModel.swift +++ /dev/null @@ -1,87 +0,0 @@ -import Foundation -import KeychainAccess -import SwiftUI - -class CardViewModel: ObservableObject { - // MARK: - Combine Variables - - @Published - var isLoggedIn: Bool = false - - @Published - var isNotRegistered: Bool = true - - @Published - var cardWalletDetails: CardWalletDetails? - - @Published - var litewalletBalance: Double = 0.0 - - @ObservedObject - var cardTwoFactor = CardTwoFactor() - - // MARK: - Public Variables - - var walletManager: WalletManager - - var store: Store - - init(walletManager: WalletManager, - store: Store) - { - self.walletManager = walletManager - - self.store = store - - calculatedLitewalletBalance() - } - - func calculatedLitewalletBalance() { - if let balance = walletManager.wallet?.balance, - let rate = store.state.currentRate - { - litewalletBalance = Amount(amount: balance, - rate: rate, - maxDigits: store.state.maxDigits).amountForLtcFormat - } - } - - /// Fetch Card Wallet details from the Ternio server - /// - Parameter completion: All is well - func fetchCardWalletDetails(completion _: @escaping () -> Void) { - let keychain = Keychain(service: "com.litecoincard.service") - - // Fetches the latest token and UserID - guard let token = keychain["token"], - let userID = keychain["userID"] - else { - LWAnalytics.logEventWithParameters(itemName: ._20210804_ERR_KLF) - return - } - - PartnerAPI.shared.getWalletDetails(userID: userID, token: token) { detailsDict in - // Only receives the data element there is the metadata - guard let data = detailsDict?["data"] as? [String: Any] - else { - LWAnalytics.logEventWithParameters(itemName: ._20210405_TAWDF) - return - } - - do { - let jsonData = try JSONSerialization.data(withJSONObject: data, options: []) - - let decoder = JSONDecoder() - - let walletDetails = try? decoder.decode(CardWalletDetails.self, from: jsonData) - - DispatchQueue.main.async { - self.cardWalletDetails = walletDetails - LWAnalytics.logEventWithParameters(itemName: ._20210804_TAWDS) - } - } catch { - print("Error: Incomplete dictionary data from partner API") - LWAnalytics.logEventWithParameters(itemName: ._20210405_TAWDF) - } - } - } -} diff --git a/loafwallet/CardWalletDetails.swift b/loafwallet/CardWalletDetails.swift deleted file mode 100644 index cd5c88d8c..000000000 --- a/loafwallet/CardWalletDetails.swift +++ /dev/null @@ -1,33 +0,0 @@ -import Foundation - -struct CardWalletDetails: Decodable { - var balance: Double? - var ltcAddress: String? - var createdAt: String? - var updatedAt: String? - var availableBalance: Double? - var withdrawableBalance: Double? - var spendableBalance: Double? - - enum CodingKeys: String, CodingKey { - case balance - case ltcAddress = "ltc_address" - case createdAt = "created_at" - case updatedAt = "updated_at" - case availableBalance = "available_balance" - case withdrawableBalance = "withdrawable_balance" - case spendableBalance = "spendable_balance" - } - - init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - balance = try? container.decode(Double.self, forKey: .balance) - ltcAddress = try? container.decode(String.self, forKey: .ltcAddress) - createdAt = try? container.decode(String.self, forKey: .createdAt) - updatedAt = try? container.decode(String.self, forKey: .updatedAt) - availableBalance = try? container.decode(Double.self, forKey: .availableBalance) - withdrawableBalance = try? container.decode(Double.self, forKey: .withdrawableBalance) - spendableBalance = try? container.decode(Double.self, forKey: .spendableBalance) - } -} diff --git a/loafwallet/CardWebViewController.swift b/loafwallet/CardWebViewController.swift new file mode 100644 index 000000000..ba9aedebf --- /dev/null +++ b/loafwallet/CardWebViewController.swift @@ -0,0 +1,26 @@ +import Foundation +import WebKit + +class CardWebViewController: UIViewController { + var webView: WKWebView! + + override func loadView() { + guard let url = URL(string: litecoinCardURL) else { return } + + let request = URLRequest(url: url) + + let webConfiguration = WKWebViewConfiguration() + webView = WKWebView(frame: .zero, configuration: webConfiguration) + webView.navigationDelegate = self + webView.load(request) + view = webView + } +} + +extension CardWebViewController: WKNavigationDelegate { + func webView(_: WKWebView, didCommit _: WKNavigation!) {} + + func webView(_: WKWebView, didFinish _: WKNavigation!) {} + + func webView(_: WKWebView, didFail _: WKNavigation!, withError _: Error) {} +} diff --git a/loafwallet/Enter2FACodeView.swift b/loafwallet/Enter2FACodeView.swift deleted file mode 100644 index 67038261a..000000000 --- a/loafwallet/Enter2FACodeView.swift +++ /dev/null @@ -1,138 +0,0 @@ -import SwiftUI - -struct Enter2FACodeView: View where Presenting: View { - // MARK: - Combine Variables - - @ObservedObject - var twoFAViewModel: Enter2FACodeViewModel - - @Binding - var shouldShowEnter2FAView: Bool - - @State - private var disableConfirmButton: Bool = true - - var presenting: Presenting - - let tokenWidth: CGFloat = 150 - - var body: some View { - GeometryReader { (_: GeometryProxy) in - HStack { - Spacer(minLength: 5) - ZStack { - self.presenting.disabled(shouldShowEnter2FAView) - VStack { - // Dismiss button - Button(action: { - twoFAViewModel.shouldDismissView { - self.shouldShowEnter2FAView.toggle() - UIApplication.shared.endEditing() - } - - }) { - Image("whiteCross") - .resizable() - .aspectRatio(contentMode: .fit) - .frame(width: 15, - height: 15) - } - .frame(minWidth: 0, maxWidth: .infinity, alignment: .trailing) - - Text(S.LitecoinCard.enterCode) - .font(Font(UIFont.barlowSemiBold(size: 21.0))) - .padding(.bottom, 8) - .foregroundColor(Color.white) - - Text(S.LitecoinCard.enterCodeDetail) - .font(Font(UIFont.barlowRegular(size: 19.0))) - .foregroundColor(Color.white) - .padding([.leading, .trailing], 20) - - TextField("", text: $twoFAViewModel.tokenString) - .textFieldStyle(RoundedBorderTextFieldStyle()) - .font(Font(UIFont.barlowLight(size: 25.0))) - .frame(width: tokenWidth, - alignment: .center) - .padding(20) - .multilineTextAlignment(.center) - .keyboardType(.numberPad) - .modifier(ClearButton(text: $twoFAViewModel.tokenString)) - .onReceive(twoFAViewModel.$tokenString, perform: { token in - if token.count == 6 { - disableConfirmButton = false - } else { - disableConfirmButton = true - } - }) - - Divider() - .background(Color.white) - - HStack { - // Confirm button - Button(action: { - twoFAViewModel.didConfirmToken { token in - twoFAViewModel.tokenString = token - - if twoFAViewModel.tokenString.count == 6 { - twoFAViewModel.didSetToken = true - - shouldShowEnter2FAView = false - } - } - - }) { - Text(S.Fragments.confirm.localizedUppercase) - .frame(minWidth: 0, maxWidth: .infinity) - .padding() - .font(Font(UIFont.barlowBold(size: 20.0))) - .foregroundColor(disableConfirmButton ? Color.gray : Color.white) - } - .disabled(disableConfirmButton) - } - } - .padding() - .overlay( - RoundedRectangle(cornerRadius: 8) - .stroke(Color.gray, lineWidth: 1.5) - ) - .background(Color(UIColor.liteWalletBlue)) - .cornerRadius(8) - .shadow(color: .black, radius: 10, x: 5, y: 5) - .opacity(self.shouldShowEnter2FAView ? 1 : 0) - } - Spacer(minLength: 5) - } - } - } -} - -struct Enter2FACodeView_Previews: PreviewProvider { - static let twoFAModel = Enter2FACodeViewModel() - - static var previews: some View { - Group { - Text("") - .padding(.all, 10) - .enter2FACodeView(shouldShowEnter2FAView: .constant(true), - twoFAModel: twoFAModel) - .previewDevice(PreviewDevice(rawValue: DeviceType.Name.iPhoneSE2)) - .previewDisplayName(DeviceType.Name.iPhoneSE2) - - Text("") - .padding(.all, 10) - .enter2FACodeView(shouldShowEnter2FAView: .constant(true), - twoFAModel: twoFAModel) - .previewDevice(PreviewDevice(rawValue: DeviceType.Name.iPhone8)) - .previewDisplayName(DeviceType.Name.iPhone8) - - Text("") - .padding(.all, 10) - .enter2FACodeView(shouldShowEnter2FAView: .constant(true), - twoFAModel: twoFAModel) - .previewDevice(PreviewDevice(rawValue: DeviceType.Name.iPhone12ProMax)) - .previewDisplayName(DeviceType.Name.iPhone12ProMax) - } - } -} diff --git a/loafwallet/Enter2FACodeViewModel.swift b/loafwallet/Enter2FACodeViewModel.swift deleted file mode 100644 index f5a7b7a40..000000000 --- a/loafwallet/Enter2FACodeViewModel.swift +++ /dev/null @@ -1,34 +0,0 @@ -import Foundation -import KeychainAccess -import SwiftUI - -class Enter2FACodeViewModel: ObservableObject { - // Description: - // The setter is used to make sure the field has only 6 digits - let characterLimit: Int - - @Published var tokenString = "" { - didSet { - if tokenString.count > characterLimit, - oldValue.count <= characterLimit - { - tokenString = oldValue - } - } - } - - @Published - var didSetToken: Bool = false - - init(limit: Int = 6) { - characterLimit = limit - } - - func shouldDismissView(completion: @escaping () -> Void) { - completion() - } - - func didConfirmToken(completion: @escaping (String) -> Void) { - completion(tokenString) - } -} diff --git a/loafwallet/ForgotAlertViewModel.swift b/loafwallet/ForgotAlertViewModel.swift index 0ec134951..2c84edb4c 100644 --- a/loafwallet/ForgotAlertViewModel.swift +++ b/loafwallet/ForgotAlertViewModel.swift @@ -1,5 +1,4 @@ import Foundation -import LitewalletPartnerAPI import SwiftUI class ForgotAlertViewModel: ObservableObject { @@ -13,14 +12,7 @@ class ForgotAlertViewModel: ObservableObject { init() {} - func resetPassword(completion: @escaping () -> Void) { - PartnerAPI.shared.forgotPassword(email: emailString) { responseMessage, code in - DispatchQueue.main.async { - self.detailMessage = "\(code): " + responseMessage - completion() - } - } - } + func resetPassword(completion _: @escaping () -> Void) {} func shouldDismissView(completion: @escaping () -> Void) { completion() diff --git a/loafwallet/ForgotView.swift b/loafwallet/ForgotView.swift index 193c85283..f1374c1c3 100644 --- a/loafwallet/ForgotView.swift +++ b/loafwallet/ForgotView.swift @@ -1,5 +1,6 @@ import SwiftUI +// DEV: To be removed in following issue https://github.com/litecoin-foundation/litewallet-ios/issues/177 struct ForgotAlertView: View where Presenting: View { // MARK: - Combine Variables diff --git a/loafwallet/ForgotViewModel.swift b/loafwallet/ForgotViewModel.swift deleted file mode 100644 index abacb8fc6..000000000 --- a/loafwallet/ForgotViewModel.swift +++ /dev/null @@ -1,4 +0,0 @@ -import Foundation -class ForgotViewModel: ObservableObject { - init() {} -} diff --git a/loafwallet/LitecoinCardUser.swift b/loafwallet/LitecoinCardUser.swift deleted file mode 100644 index 6138d0407..000000000 --- a/loafwallet/LitecoinCardUser.swift +++ /dev/null @@ -1,7 +0,0 @@ -import Foundation - -struct LitecoinCardUser: Codable { - var userID: String - var referralCode: String - var createdAt: String -} diff --git a/loafwallet/LoginCardAlertView.swift b/loafwallet/LoginCardAlertView.swift deleted file mode 100644 index ffdcc9406..000000000 --- a/loafwallet/LoginCardAlertView.swift +++ /dev/null @@ -1,73 +0,0 @@ -import SwiftUI - -struct LoginCardAlertView: View where Presenting: View { - @Binding - var isShowingLoginAlert: Bool - - @Binding - var didFail: Bool - - @Binding - var mainMessage: String - - let presenting: Presenting - - var body: some View { - GeometryReader { (deviceSize: GeometryProxy) in - HStack { Spacer() - ZStack { - self.presenting.disabled(isShowingLoginAlert) - - VStack { - Text(self.mainMessage) - .padding() - .font(Font(UIFont.customMedium(size: 16.0))) - .foregroundColor(Color(UIColor.liteWalletBlue)) - ActivityIndicator(isAnimating: $isShowingLoginAlert, - style: .medium) - .padding(.bottom, 15) - Divider() - HStack { - Button(action: { - withAnimation { - self.isShowingLoginAlert.toggle() - } - }) { - Text(S.Prompts.dismiss.localizedCapitalized) - .font(Font(UIFont.barlowLight(size: 14.0))) - .foregroundColor(.gray) - }.padding([.top, .bottom], 5) - } - } - .padding() - .overlay( - RoundedRectangle(cornerRadius: 8) - .stroke(Color.gray, lineWidth: 1.5) - ) - .background(Color.white) - .cornerRadius(8) - .frame( - width: deviceSize.size.width * 0.85, - height: deviceSize.size.height * 0.5 - ) - .shadow(color: .gray, radius: /*@START_MENU_TOKEN@*/10/*@END_MENU_TOKEN@*/, x: 5, y: 5) - .opacity(self.isShowingLoginAlert ? 1 : 0) - } - Spacer() - } - } - } -} - -struct LoginCardAlertView_Previews: PreviewProvider { - static var previews: some View { - VStack { - Spacer() - Text("").padding(.all, 10) - .loginAlertView(isShowingLoginAlert: .constant(true), - didFail: .constant(true), - message: .constant("Login...")) - Spacer() - } - } -} diff --git a/loafwallet/LoginViewModel.swift b/loafwallet/LoginViewModel.swift deleted file mode 100644 index 06175c73b..000000000 --- a/loafwallet/LoginViewModel.swift +++ /dev/null @@ -1,82 +0,0 @@ -import Foundation -import KeychainAccess - -class LoginViewModel: ObservableObject { - // MARK: - Combine Variables - - @Published - var emailString: String = "" - - @Published - var passwordString: String = "" - - @Published - var tokenString: String = "" - - @Published - var isLoggedIn: Bool = false - - @Published - var doShowModal: Bool = false - - @Published - var didCompleteLogin: Bool = false - - @Published - var processMessage: String = S.LitecoinCard.login + " ..." - - // MARK: - Private Variables - - private let keychain = Keychain(service: "com.litecoincard.service") - - init() - {} - - func simpleCredentialsCheck() -> Bool { - return (emailString.isEmpty && passwordString.isEmpty) - } - - func login(completion: @escaping (Bool) -> Void) { - // Turn on the modal - doShowModal = false - - let credentials: [String: Any] = ["email": emailString, - "password": passwordString, - "token": tokenString] - - PartnerAPI.shared.loginUser(credentials: credentials) { dataDictionary in - if let error = dataDictionary?["error"] as? String { - DispatchQueue.main.async { - print("ERROR: Login failure: \(error.description)") - - self.isLoggedIn = false - self.didCompleteLogin = false - completion(self.didCompleteLogin) - } - } - - if let responeDict = dataDictionary, - let token = responeDict["token"] as? String, - let userID = responeDict["uuid"] as? String, - let email = credentials["email"] as? String, - let password = credentials["password"] as? String - { - self.keychain[email] = password - self.keychain["userID"] = userID - self.keychain["token"] = token - - DispatchQueue.main.asyncAfter(deadline: .now() + 2.0) { - self.isLoggedIn = true - self.didCompleteLogin = true - - // Turn modal off - self.doShowModal = false - - NotificationCenter.default.post(name: .LitecoinCardLoginNotification, object: nil, - userInfo: nil) - completion(self.didCompleteLogin) - } - } - } - } -} diff --git a/loafwallet/MainTabBarViewModel.swift b/loafwallet/MainTabBarViewModel.swift deleted file mode 100644 index 2eb6e3f8e..000000000 --- a/loafwallet/MainTabBarViewModel.swift +++ /dev/null @@ -1,4 +0,0 @@ -import Foundation -class MainTabBarViewModel: ObservableObject { - init() {} -} diff --git a/loafwallet/PartnerAPIManager.swift b/loafwallet/PartnerAPIManager.swift deleted file mode 100644 index 285b87a49..000000000 --- a/loafwallet/PartnerAPIManager.swift +++ /dev/null @@ -1,10 +0,0 @@ -import Foundation -import LitewalletPartnerAPI - -class PartnerAPI: NSObject { - static let shared = PartnerAPIManager() - - override init() { - super.init() - } -} diff --git a/loafwallet/PartnerData.swift b/loafwallet/PartnerData.swift index d50b42875..7e3f8cce6 100644 --- a/loafwallet/PartnerData.swift +++ b/loafwallet/PartnerData.swift @@ -3,7 +3,7 @@ import UIKit enum PartnerName { case unstop - case changeNow + case changeNow } struct Partner { diff --git a/loafwallet/PreTransferView.swift b/loafwallet/PreTransferView.swift deleted file mode 100644 index 8b6e672c3..000000000 --- a/loafwallet/PreTransferView.swift +++ /dev/null @@ -1,147 +0,0 @@ -import SwiftUI - -struct PreTransferView: View { - // MARK: - Combine Variables - - @Binding - var wasTapped: Bool - - @Binding - var parentWalletType: WalletType - - // MARK: - Private Variables - - private let mainPadding: CGFloat = 20.0 - - private let generalCornerRadius: CGFloat = 8.0 - - private let largeHeight: CGFloat = 125.0 - - var twoFactorEnabled: Bool = false - - var walletBalance: Double - - var localWalletType: WalletType - - init(walletBalance: Double, - parentWalletType: Binding, - localWalletType: WalletType, - wasTapped: Binding, - twoFactorEnabled: Bool) - { - _wasTapped = wasTapped - - _parentWalletType = parentWalletType - - self.walletBalance = walletBalance - - self.twoFactorEnabled = twoFactorEnabled - - self.localWalletType = localWalletType - } - - var body: some View { - VStack { - ZStack { - RoundedRectangle(cornerRadius: generalCornerRadius) - .frame(height: largeHeight, - alignment: .center) - .frame(maxWidth: .infinity) - .padding(mainPadding) - .foregroundColor(Color.litecoinGray) - .shadow(radius: 1.0, x: 2.0, y: 2.0) - .overlay( - HStack { - // Wallet type image & title - VStack(alignment: .center) { - Spacer() - - if localWalletType == .litecoinCard { - CardIconView() - } else { - LitewalletIconView() - } - - Text(localWalletType.nameLabel) - .font(Font(UIFont.barlowSemiBold(size: 18.0))) - .foregroundColor(Color.liteWalletDarkBlue) - - Spacer() - } - .padding(.leading, mainPadding + 12.0) - - // Balance label - VStack { - Text(String(format: "%5.4f Ł", walletBalance)) - .frame(minWidth: 0, maxWidth: .infinity, alignment: .trailing) - .foregroundColor(walletBalance == 0.0 ? .litecoinSilver : .liteWalletDarkBlue) - .multilineTextAlignment(.trailing) - .font(Font(twoFactorEnabled ? UIFont.barlowRegular(size: 20.0) : UIFont.barlowBold(size: 20.0))) - .padding(.trailing, twoFactorEnabled ? 5.0 : 40.0) - } - - // Selection button - if twoFactorEnabled { - VStack { - Button(action: { - self.wasTapped = true - - parentWalletType = localWalletType - - }) { - ZStack { - Rectangle() - .frame(minHeight: 0, - maxHeight: .infinity, - alignment: .center) - .frame(width: 50.0) - .foregroundColor(walletBalance == 0.0 ? Color.litewalletLightGray : Color.liteWalletBlue) - .shadow(radius: 1.0, x: 2.0, y: 2.0) - - Image(systemName: "chevron.right") - .resizable() - .aspectRatio(contentMode: .fit) - .frame(width: 20, height: 20, alignment: .center) - .foregroundColor(walletBalance == 0.0 ? .litecoinSilver : .white) - } - } - .cornerRadius(generalCornerRadius, corners: [.topRight, .bottomRight]) - .disabled(walletBalance == 0.0 ? true : false) - } - .frame(height: largeHeight, - alignment: .center) - .padding(.trailing, mainPadding) - } - } - ) - .frame(height: largeHeight, - alignment: .center) - .frame(maxWidth: .infinity) - } - } - } -} - -struct PreTransferView_Previews: PreviewProvider { - static let lcImagestr = MockData.cardImageString - static let lwImagestr = MockData.logoImageString - static let small = MockData.smallBalance - static let large = MockData.largeBalance - - static let walletManager = try! WalletManager(store: Store(), dbPath: nil) - - static var previews: some View { - Group { - VStack { - PreTransferView(walletBalance: 0.0, - parentWalletType: .constant(.litecoinCard), - localWalletType: .litewallet, - wasTapped: .constant(false), - twoFactorEnabled: false) - Spacer() - } - .previewDevice(PreviewDevice(rawValue: DeviceType.Name.iPhoneSE2)) - .previewDisplayName(DeviceType.Name.iPhoneSE2) - } - } -} diff --git a/loafwallet/PreTransferViewModel.swift b/loafwallet/PreTransferViewModel.swift deleted file mode 100644 index f6917a38c..000000000 --- a/loafwallet/PreTransferViewModel.swift +++ /dev/null @@ -1,16 +0,0 @@ -import Foundation -import SwiftUI - -class PreTransferViewModel: ObservableObject { - // MARK: - Public Parameters - - var walletType: WalletType - - var balance: Double - - init(walletType: WalletType, balance: Double) { - self.walletType = walletType - - self.balance = balance - } -} diff --git a/loafwallet/RegistrationAlertView.swift b/loafwallet/RegistrationAlertView.swift deleted file mode 100644 index 7593618da..000000000 --- a/loafwallet/RegistrationAlertView.swift +++ /dev/null @@ -1,80 +0,0 @@ -import SwiftUI - -struct RegistrationAlertView: View where Presenting: View { - @Binding - var shouldStartRegistering: Bool - - @Binding - var didRegister: Bool - - @Binding - var mainMessage: String - - let presenting: Presenting - - var body: some View { - GeometryReader { (deviceSize: GeometryProxy) in - HStack { Spacer() - ZStack { - self.presenting - .disabled(shouldStartRegistering) - VStack { - Text(mainMessage) - .frame(minWidth: 0, - maxWidth: .infinity, - alignment: .center) - .multilineTextAlignment(.center) - .font(Font(UIFont.barlowRegular(size: 16.0))) - .foregroundColor(Color(UIColor.liteWalletBlue)) - .padding(.bottom, 20) - .padding(.top, 10) - .padding([.leading, .trailing], 20) - ActivityIndicator(isAnimating: $shouldStartRegistering, - style: .medium) - .padding(.bottom, 15) - Divider() - HStack { - Button(action: { - withAnimation { - shouldStartRegistering.toggle() - } - }) { - Text(S.Prompts.dismiss.localizedCapitalized) - .font(Font(UIFont.barlowLight(size: 14.0))) - .foregroundColor(.gray) - }.padding([.top, .bottom], 5) - } - } - .padding() - .overlay( - RoundedRectangle(cornerRadius: 8) - .stroke(Color.gray, lineWidth: 1.5) - ) - .background(Color.white) - .cornerRadius(8) - .frame( - width: deviceSize.size.width * 0.8, - height: deviceSize.size.height * 0.7 - ) - .shadow(color: .gray, radius: /*@START_MENU_TOKEN@*/10/*@END_MENU_TOKEN@*/, x: 5, y: 5) - .opacity(shouldStartRegistering ? 1 : 0) - } - Spacer() - } - } - } -} - -struct RegistrationAlertView_Previews: PreviewProvider { - static var previews: some View { - VStack { - Spacer() - Text("").padding(.all, 10) - .registeredAlertView(shouldStartRegistering: .constant(true), - didRegister: .constant(false), - data: [:], - message: .constant("vwevwvvwv\nwevwevwevwevwevwvwevwvwvewRegistering...")) - Spacer() - } - } -} diff --git a/loafwallet/RegistrationView.swift b/loafwallet/RegistrationView.swift deleted file mode 100644 index 9fca75da8..000000000 --- a/loafwallet/RegistrationView.swift +++ /dev/null @@ -1,351 +0,0 @@ -import SwiftUI - -struct RegistrationView: View { - // MARK: - Combine Variables - - @ObservedObject - var viewModel: RegistrationViewModel - - @Environment(\.presentationMode) - var presentationMode - - @State - var usernameEmail: String = "" - - @State - var password: String = "" - - @State - var confirmPassword: String = "" - - @State - var firstName: String = "" - - @State - var lastName: String = "" - - @State - var address: String = "" - - @State - var city: String = "" - - @State - var state: String = "" - - @State - var country: String = "US" - - @State - var zipCodePostCode: String = "" - - @State - var mobileNumber: String = "" - - @State - var currentOffset = 0.0 - - @State - private var shouldStartRegistering: Bool = false - - @State - private var didRegister: Bool = false - - init(viewModel: RegistrationViewModel) { - self.viewModel = viewModel - UITableView.appearance().backgroundColor = .clear - } - - // DEV: This layout needs to be polished after v1 so it looks nicer. - var body: some View { - GeometryReader { _ in - // Litewallet Blue Background - VStack { - Text(S.LitecoinCard.Registration.registerCardPhrase) - .multilineTextAlignment(.leading) - .foregroundColor(.white) - .font(Font(UIFont.barlowBold(size: 20.0))) - .padding(.top, 20) - .padding(.bottom, 10) - - // White Background - VStack { - // MARK: - User names - - Group { - HStack { - VStack { - TextField(S.LitecoinCard.Registration.firstName, - text: $firstName) - .font(Font(UIFont.barlowRegular(size: 16.0))) - .keyboardType(.namePhonePad) - .padding([.leading, .trailing, .top], 4) - .padding(.top, 12) - .foregroundColor(viewModel.isDataValid(dataType: .genericString, - data: firstName) ? .black : Color(UIColor.litecoinOrange)) - Divider() - .padding([.leading, .bottom, .trailing], 4) - .padding(.top, 1) - } - - VStack { - TextField(S.LitecoinCard.Registration.lastName, - text: $lastName) - .font(Font(UIFont.barlowRegular(size: 16.0))) - .keyboardType(.namePhonePad) - .padding([.leading, .trailing, .top], 4) - .padding(.top, 12) - .foregroundColor(viewModel.isDataValid(dataType: .genericString, - data: lastName) ? .black : Color(UIColor.litecoinOrange)) - Divider() - .padding([.leading, .bottom, .trailing], 4) - .padding(.top, 1) - } - } - } - - // MARK: - Login credentials - - Group { - TextField(S.Receive.emailButton, - text: $usernameEmail) - .font(Font(UIFont.barlowRegular(size: 16.0))) - .keyboardType(.emailAddress) - .padding([.leading, .trailing, .top], 4) - .foregroundColor(viewModel.isDataValid(dataType: .email, - data: usernameEmail) ? .black : Color(UIColor.litecoinOrange)) - Divider() - .padding([.leading, .bottom, .trailing], 4) - .padding(.top, 1) - - HStack { - VStack { - TextField(S.LitecoinCard.Registration.password, - text: $password) - .font(Font(UIFont.barlowRegular(size: 16.0))) - .autocapitalization(.none) - .keyboardType(.default) - .padding([.leading, .trailing, .top], 4) - .foregroundColor(viewModel.isDataValid(dataType: .password, - data: password) ? .black : Color(UIColor.litecoinOrange)) - Divider() - .padding([.leading, .bottom, .trailing], 4) - .padding(.top, 1) - } - - VStack { - TextField(S.LitecoinCard.Registration.confirmPassword, - text: $confirmPassword) - .font(Font(UIFont.barlowRegular(size: 16.0))) - .autocapitalization(.none) - .keyboardType(.default) - .padding([.leading, .trailing, .top], 4) - .foregroundColor(viewModel.isDataValid(dataType: .confirmation, - firstString: password, - data: confirmPassword) ? .black : Color(UIColor.litecoinOrange)) - Divider() - .padding([.leading, .bottom, .trailing], 4) - .padding(.top, 1) - } - } - } - - // MARK: - Mobile number - - Group { - VStack { - TextField(S.LitecoinCard.Registration.mobileNumber, text: $mobileNumber) - .font(Font(UIFont.barlowRegular(size: 16.0))) - .keyboardType(.numberPad) - .padding([.leading, .trailing, .top], 4) - .foregroundColor(viewModel.isDataValid(dataType: .mobileNumber, - data: mobileNumber) ? .black : Color(UIColor.litecoinOrange)) - Divider() - .padding([.leading, .bottom, .trailing], 4) - .padding(.top, 1) - } - } - - // MARK: - Location - - Group { - HStack { - VStack { - TextField(S.LitecoinCard.Registration.address, text: $address) - .padding([.leading, .trailing, .top], 4) - .font(Font(UIFont.barlowRegular(size: 16.0))) - .foregroundColor(viewModel.isDataValid(dataType: .genericString, - data: address) ? .black : Color(UIColor.litecoinOrange)) - Divider() - .padding([.leading, .bottom, .trailing], 4) - .padding(.top, 1) - } - } - HStack { - VStack { - TextField(S.LitecoinCard.Registration.city, text: $city) - .font(Font(UIFont.barlowRegular(size: 16.0))) - .padding([.leading, .trailing, .top], 4) - .foregroundColor(viewModel.isDataValid(dataType: .genericString, - data: city) ? .black : Color(UIColor.litecoinOrange)) - Divider() - .padding([.leading, .bottom, .trailing], 4) - .padding(.top, 1) - } - VStack { - TextField(S.LitecoinCard.Registration.stateProvince, text: $state) - .font(Font(UIFont.barlowRegular(size: 16.0))) - .padding([.leading, .trailing, .top], 4) - .foregroundColor(viewModel.isDataValid(dataType: .genericString, - data: state) ? .black : Color(UIColor.litecoinOrange)) - Divider() - .padding([.leading, .bottom, .trailing], 4) - .padding(.top, 1) - } - } - - HStack { - VStack { - // DEV: Will change when Ex-US support comes - TextField("US", text: $country) - .font(Font(UIFont.barlowRegular(size: 16.0))) - .foregroundColor(.gray) - .padding([.leading, .trailing, .top], 4) - .disabled(true) - Divider() - .padding([.leading, .bottom, .trailing], 4) - .padding(.top, 1) - } - - VStack { - // DEV: Will change when EU support comes - TextField(S.LitecoinCard.Registration.zipPostCode, text: $zipCodePostCode) - .font(Font(UIFont.barlowRegular(size: 16.0))) - .padding([.leading, .trailing, .top], 4) - Divider() - .padding([.leading, .bottom, .trailing], 4) - .padding(.top, 1) - } - } - } - } - .padding([.leading, .trailing], 15) // This pads all subviews - .padding(.bottom, 30) - .background(Color.white) - .cornerRadius(4) - - Spacer(minLength: CGFloat(self.currentOffset)) - - // MARK: - Action Buttons - - HStack { - // Button to reset fields - Button(action: { - resetFields() - }) { - Text(S.Button.resetFields) - .frame(minWidth: 0, maxWidth: .infinity) - .padding() - .font(Font(UIFont.barlowRegular(size: 20.0))) - .foregroundColor(Color(UIColor.litecoinOrange)) - .overlay( - RoundedRectangle(cornerRadius: 4) - .stroke(Color(UIColor.white), lineWidth: 1) - ) - } - - // Button to register user - Button(action: { - viewModel.verify(data: loadDataDictionary()) { isAllRegisterDataValid in - // Pass state to trigger the modal view - shouldStartRegistering = isAllRegisterDataValid - - // Make a registration call - viewModel.registerCardUser() - - // Dismiss Sheet - self.presentationMode.wrappedValue.dismiss() - } - - }) { - Text(S.Button.submit) - .frame(minWidth: 0, maxWidth: .infinity) - .padding() - .font(Font(UIFont.barlowBold(size: 20.0))) - .foregroundColor(Color(UIColor.liteWalletBlue)) - .background(Color.white) - .cornerRadius(4) - .overlay( - RoundedRectangle(cornerRadius: 4) - .stroke(Color(UIColor.white), lineWidth: 1) - ) - } - } - } - .padding([.leading, .trailing], 15) - .padding(.top, 15) - .padding(.bottom, 30) - .background(Color(UIColor.liteWalletBlue)) - .edgesIgnoringSafeArea(.all) - } - .onReceive(NotificationCenter.default.publisher(for: NSNotification.Name.UIKeyboardWillShow)) - { notification in - if let keyboardSize = (notification.userInfo?[UIKeyboardFrameEndUserInfoKey] as? NSValue)?.cgRectValue - { - self.currentOffset = Double(keyboardSize.height) - } - }.onReceive(NotificationCenter.default.publisher(for: NSNotification.Name.UIKeyboardWillHide)) - { _ in - self.currentOffset = 0.0 - } - } - - private func resetFields() { - usernameEmail = "" - password = "" - confirmPassword = "" - firstName = "" - lastName = "" - address = "" - city = "" - state = "" - zipCodePostCode = "" - mobileNumber = "" - } - - private func loadDataDictionary() -> [String: Any] { - viewModel.dataDictionary["firstname"] = firstName - viewModel.dataDictionary["lastname"] = lastName - viewModel.dataDictionary["email"] = usernameEmail.lowercased() - viewModel.dataDictionary["password"] = password - viewModel.dataDictionary["password_confirmation"] = confirmPassword - viewModel.dataDictionary["phone"] = mobileNumber - viewModel.dataDictionary["city"] = city - viewModel.dataDictionary["country"] = country - viewModel.dataDictionary["state"] = state - viewModel.dataDictionary["address1"] = address - viewModel.dataDictionary["address2"] = "second line" // API requires this but it doesnt use the data - viewModel.dataDictionary["zip_code"] = zipCodePostCode - return viewModel.dataDictionary - } -} - -struct RegistrationView_Previews: PreviewProvider { - static let viewModel = RegistrationViewModel() - - static var previews: some View { - Group { - RegistrationView(viewModel: viewModel) - .previewDevice(PreviewDevice(rawValue: DeviceType.Name.iPhoneSE2)) - .previewDisplayName(DeviceType.Name.iPhoneSE2) - - RegistrationView(viewModel: viewModel) - .previewDevice(PreviewDevice(rawValue: DeviceType.Name.iPhone8)) - .previewDisplayName(DeviceType.Name.iPhone8) - - RegistrationView(viewModel: viewModel) - .previewDevice(PreviewDevice(rawValue: DeviceType.Name.iPhone12ProMax)) - .previewDisplayName(DeviceType.Name.iPhone12ProMax) - } - } -} diff --git a/loafwallet/RegistrationViewModel.swift b/loafwallet/RegistrationViewModel.swift deleted file mode 100644 index 798139438..000000000 --- a/loafwallet/RegistrationViewModel.swift +++ /dev/null @@ -1,198 +0,0 @@ -import Foundation -import KeychainAccess -import SwiftUI - -enum UserDataType { - case genericString - case email - case country - case mobileNumber - case password - case confirmation -} - -class RegistrationViewModel: ObservableObject { - @Published - var isRegistering: Bool = false - - @Published - var didRegister: Bool = false - - @Published - var message: String = S.LitecoinCard.registeringUser - - var dataDictionary = [String: Any]() - - init() - {} - - func verify(data: [String: Any], - completion: @escaping (Bool) -> Void) - { - guard let first = data["firstname"] as? String else { return } - guard let last = data["lastname"] as? String else { return } - guard let email = data["email"] as? String else { return } - guard let password = data["password"] as? String else { return } - guard let phone = data["phone"] as? String else { return } - guard let country = data["country"] as? String else { return } - guard let state = data["state"] as? String else { return } - guard let city = data["city"] as? String else { return } - guard let address1 = data["address1"] as? String else { return } - guard let zip = data["zip_code"] as? String else { return } - - if isDataValid(dataType: .genericString, data: first), - isDataValid(dataType: .genericString, data: last), - isDataValid(dataType: .email, data: email), - isDataValid(dataType: .password, data: password), - isDataValid(dataType: .mobileNumber, data: phone), - isDataValid(dataType: .country, data: country), - isDataValid(dataType: .genericString, data: state), - isDataValid(dataType: .genericString, data: city), - isDataValid(dataType: .genericString, data: address1), - isDataValid(dataType: .genericString, data: zip) - { - dataDictionary = data - - isRegistering = true - - completion(isRegistering) - } - } - - func registerCardUser() { - var setupUserID: String? - - PartnerAPI.shared.createUser(userDataParams: dataDictionary) { newUser in - if let userID = newUser?.userID, - let createdAt = newUser?.createdAtDateString - { - /// Move setupUserID - setupUserID = userID - - guard let password = self.dataDictionary["password"] as? String else { return } - guard let email = self.dataDictionary["email"] as? String else { return } - - let keychain = Keychain(service: "com.litecoincard.service") - - keychain[email] = password - keychain["userID"] = userID - keychain["createdAt"] = createdAt - - DispatchQueue.main.async { - self.message = S.LitecoinCard.registrationSuccess - self.didRegister = true - - DispatchQueue.main.asyncAfter(deadline: .now() + 5.0) { - self.isRegistering = false - } - } - } - } - - if setupUserID == nil { - DispatchQueue.main.async { - self.message = S.LitecoinCard.registrationFailure - DispatchQueue.main.asyncAfter(deadline: .now() + 4.0) { - self.isRegistering = false - } - } - } - } - - func isDataValid(dataType: UserDataType, firstString: String = "", data: Any) -> Bool { - guard let dataString = data as? String else { return false } - - switch dataType { - case .genericString: - return isGenericStringValid(genericString: dataString) - case .email: - return EmailValidation.isEmailValid(emailString: dataString) - case .country: - return dataString == "US" ? true : false - case .mobileNumber: - return isMobileNumberValid(mobileString: dataString) - case .password: - return isPasswordValid(passwordString: dataString) - case .confirmation: - return isConfirmedValid(firstString: firstString, confirmingString: dataString) - } - } - - // MARK: - Data Validators - - func isGenericStringValid(genericString: String) -> Bool { - guard genericString != "" - else { - return false - } - - guard genericString.count <= 32 - else { - return false - } - - return true - } - - func isConfirmedValid(firstString: String, confirmingString: String) -> Bool { - return firstString == confirmingString ? true : false - } - - func isEmailValid(emailString: String) -> Bool { - if try! NSRegularExpression(pattern: "^[A-Z0-9a-z._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,4}$", options: .caseInsensitive) - .firstMatch(in: emailString, options: [], - range: NSRange(location: 0, - length: emailString.count)) == nil - { - return false - } else { - return true - } - } - - /// Password Validator - /// - Parameter passwordString: 6 chars minimum - /// - Returns: Bool - func isPasswordValid(passwordString: String) -> Bool { - guard passwordString.count >= 6 - else { - return false - } - - if try! NSRegularExpression(pattern: "^(?=.*[A-Za-z])(?=.*\\d)[A-Za-z\\d]{6,}$", options: .caseInsensitive) - .firstMatch(in: passwordString, options: [], - range: NSRange(location: 0, - length: passwordString.count)) == nil - { - return false - } else { - return true - } - } - - /// Mobile Number Validator - /// - Parameter mobileString: 10+ integers 0 - 9 - /// - Returns: Bool - func isMobileNumberValid(mobileString: String) -> Bool { - guard mobileString != "" - else { - return false - } - - // https://boards.straightdope.com/t/longest-telephone-number-in-the-world/400450 - guard mobileString.count >= 10, mobileString.count <= 20 - else { - return false - } - - if try! NSRegularExpression(pattern: "^[0-9]*$", options: .caseInsensitive) - .firstMatch(in: mobileString, options: [], - range: NSRange(location: 0, - length: mobileString.count)) == nil - { - return false - } else { - return true - } - } -} diff --git a/loafwallet/Storyboards/Card.storyboard b/loafwallet/Storyboards/Card.storyboard index b375d8c04..a47515477 100644 --- a/loafwallet/Storyboards/Card.storyboard +++ b/loafwallet/Storyboards/Card.storyboard @@ -1,17 +1,17 @@ - + - + - + - + diff --git a/loafwallet/TabBarViewController.swift b/loafwallet/TabBarViewController.swift index f1d8a88a0..4ecc4be2a 100644 --- a/loafwallet/TabBarViewController.swift +++ b/loafwallet/TabBarViewController.swift @@ -14,14 +14,13 @@ class TabBarViewController: UIViewController, Subscriber, Trackable, UITabBarDel private let largeFontSize: CGFloat = 24.0 private let smallFontSize: CGFloat = 12.0 private var hasInitialized = false - private var didLoginLitecoinCardAccount = false private let dateFormatter = DateFormatter() private let equalsLabel = UILabel(font: .barlowMedium(size: 12), color: .whiteTint) private var regularConstraints: [NSLayoutConstraint] = [] private var swappedConstraints: [NSLayoutConstraint] = [] private let currencyTapView = UIView() private let storyboardNames: [String] = ["Transactions", "Send", "Card", "Receive", "Buy"] - var storyboardIDs: [String] = ["TransactionsViewController", "SendLTCViewController", "CardViewController", "ReceiveLTCViewController", "BuyTableViewController"] + var storyboardIDs: [String] = ["TransactionsViewController", "SendLTCViewController", "CardWebViewController", "ReceiveLTCViewController", "BuyTableViewController"] var viewControllers: [UIViewController] = [] var activeController: UIViewController? var updateTimer: Timer? @@ -334,17 +333,8 @@ class TabBarViewController: UIViewController, Subscriber, Trackable, UITabBarDel transactionVC.walletManager = walletManager transactionVC.isLtcSwapped = store?.state.isLtcSwapped - case "loafwallet.CardViewController": - guard let cardVC = contentController as? CardViewController - else { - return - } - - cardVC.parentFrame = containerView.frame - - cardVC.store = store - - cardVC.walletManager = walletManager + case "loafwallet.CardWebViewController": + let cardVC = contentController as? CardWebViewController case "loafwallet.BuyTableViewController": guard let buyVC = contentController as? BuyTableViewController diff --git a/loafwallet/TransactionsViewController.swift b/loafwallet/TransactionsViewController.swift index 4e40e67ab..ed694f6f2 100644 --- a/loafwallet/TransactionsViewController.swift +++ b/loafwallet/TransactionsViewController.swift @@ -368,7 +368,7 @@ class TransactionsViewController: UIViewController, UITableViewDelegate, UITable // MARK: - Wallet State: Show Status Bar store.subscribe(self, name: .showStatusBar) { _ in - // DEV: May fix where the action view persists after confirming pin + // DEV: May refactor where the action view persists after confirming pin self.reload() } diff --git a/loafwallet/TransferAmountViewModel.swift b/loafwallet/TransferAmountViewModel.swift index d645c7fc4..8480145ff 100644 --- a/loafwallet/TransferAmountViewModel.swift +++ b/loafwallet/TransferAmountViewModel.swift @@ -3,6 +3,8 @@ import Foundation import KeychainAccess import UIKit +// DEV: To be removed in following issue https://github.com/litecoin-foundation/litewallet-ios/issues/177 + class TransferAmountViewModel: ObservableObject { // MARK: - Combine Variables @@ -75,8 +77,8 @@ class TransferAmountViewModel: ObservableObject { /// - amount: Litecoin to 6 decimal places /// - completion: To complete process /// - address: Destination Litecoin address - func transferToLitewallet(amount: Double, - address: String, + func transferToLitewallet(amount _: Double, + address _: String, completion _: @escaping () -> Void) { let keychain = Keychain(service: "com.litecoincard.service") @@ -88,17 +90,6 @@ class TransferAmountViewModel: ObservableObject { LWAnalytics.logEventWithParameters(itemName: ._20210804_ERR_KLF) return } - - PartnerAPI - .shared - .withdrawToWallet(userID: userID, - token: token, - withdrawal: - ["amount": amount, - "wallet_address": address]) { _ in - // DEV: Mothballed - // Need information from Ternio to move forward - } } /// Transfer Litecoin from **Litewallet to Litecoin Card** diff --git a/loafwallet/TransferringView.swift b/loafwallet/TransferringView.swift deleted file mode 100644 index 22089937d..000000000 --- a/loafwallet/TransferringView.swift +++ /dev/null @@ -1,167 +0,0 @@ -import Foundation -import SwiftUI -import UIKit - -struct TransferringModalView: View { - // MARK: - Combine Variables - - @ObservedObject - var viewModel: TransferringViewModel - - @Binding - var isShowingTransferring: Bool - - @Binding - var shouldStartTransfer: Bool - - @State - var detailMessage: String = S.LitecoinCard.resetPasswordDetail - - // MARK: - Private Variables - - private var destinationAddress: String - - private var transferAmount: Double - - private var walletType: WalletType - - private let generalSidePadding: CGFloat = 40.0 - - init(viewModel: TransferringViewModel, - isShowingTransferring: Binding, - shouldStartTransfer: Binding, - destinationAddress: String, - transferAmount: Double, - walletType: WalletType) - { - _isShowingTransferring = isShowingTransferring - - _shouldStartTransfer = shouldStartTransfer - - self.viewModel = viewModel - - self.destinationAddress = destinationAddress - - self.transferAmount = transferAmount - - print("XXX Transferring View transfer Amount\(self.transferAmount)") - - self.walletType = walletType - - // Flip for the transfer destination - if self.walletType == .litewallet { - self.walletType = .litecoinCard - } else { - self.walletType = .litewallet - } - } - - var body: some View { - GeometryReader { (deviceSize: GeometryProxy) in - HStack { - Spacer() - ZStack { - VStack { - // Dismiss button - Button(action: { - viewModel.shouldDismissView { - self.isShowingTransferring.toggle() - viewModel.shouldStartTransfer = false - } - - }) { - Image("whiteCross") - .resizable() - .aspectRatio(contentMode: .fit) - .frame(width: 15, - height: 15) - } - .frame(minWidth: 0, maxWidth: .infinity, alignment: .trailing) - - Text(S.LitecoinCard.Transfer.title + ": " + String(format: "%6.6f Ł", self.transferAmount)) - .font(Font(UIFont.barlowSemiBold(size: 21.0))) - .padding(.bottom, 10) - .foregroundColor(Color.white) - .padding([.leading, .trailing], generalSidePadding) - - Text(S.Fragments.to + " " + (self.walletType == .litewallet ? "Litewallet" : S.LitecoinCard.barItemTitle.localizedCapitalized)) - .font(Font(UIFont.barlowSemiBold(size: 21.0))) - .padding(.bottom, 10) - .foregroundColor(Color.white) - .padding([.leading, .trailing], generalSidePadding) - - // Confirm OK button - Button(action: { - viewModel.shouldStartTransfer = true - }) { - Text(S.Button.ok) - .frame(minWidth: 0, maxWidth: .infinity) - .font(Font(UIFont.barlowBold(size: 20.0))) - .foregroundColor(Color.white) - .padding(.all, 8) - .overlay( - RoundedRectangle(cornerRadius: 4) - .stroke(Color(UIColor.white), lineWidth: 1) - ) - .padding([.leading, .trailing], generalSidePadding) - .padding([.top, .bottom], 10) - }.padding(.top, 15) - } - .padding() - .overlay( - RoundedRectangle(cornerRadius: 8) - .stroke(Color.gray, lineWidth: 1.5) - ) - .background(Color(UIColor.liteWalletBlue)) - .cornerRadius(8) - .frame( - width: deviceSize.size.width * 0.9, - height: deviceSize.size.height * 0.95 - ) - .shadow(color: .black, radius: 10, x: 5, y: 5) - .opacity(self.isShowingTransferring ? 1 : 0) - } - Spacer() - } - } - } -} - -struct TransferringModalView_Previews: PreviewProvider { - static let viewModel = TransferringViewModel() - static let destinationAddres1: String = "MVZj7gBRwcVpa9AAWdJm8A3HqTst112eJe" - static let destinationAddres2: String = "MJ4W7NZya4SzE7R6xpEVdamGCimaQYPiWu" - static let bigTransferAmount: Double = 15274.00343 - static let smallTransferAmount: Double = 0.0254521 - - static var previews: some View { - Group { - TransferringModalView(viewModel: viewModel, - isShowingTransferring: .constant(true), - shouldStartTransfer: .constant(true), - destinationAddress: destinationAddres1, - transferAmount: bigTransferAmount, - walletType: .litecoinCard) - .previewDevice(PreviewDevice(rawValue: DeviceType.Name.iPhoneSE2)) - .previewDisplayName(DeviceType.Name.iPhoneSE2) - - TransferringModalView(viewModel: viewModel, - isShowingTransferring: .constant(true), - shouldStartTransfer: .constant(true), - destinationAddress: destinationAddres2, - transferAmount: bigTransferAmount, - walletType: .litewallet) - .previewDevice(PreviewDevice(rawValue: DeviceType.Name.iPhone8)) - .previewDisplayName(DeviceType.Name.iPhone8) - - TransferringModalView(viewModel: viewModel, - isShowingTransferring: .constant(true), - shouldStartTransfer: .constant(true), - destinationAddress: destinationAddres1, - transferAmount: bigTransferAmount, - walletType: .litecoinCard) - .previewDevice(PreviewDevice(rawValue: DeviceType.Name.iPhone12ProMax)) - .previewDisplayName(DeviceType.Name.iPhone12ProMax) - } - } -} diff --git a/loafwallet/TransferringViewModel.swift b/loafwallet/TransferringViewModel.swift deleted file mode 100644 index c6e141efe..000000000 --- a/loafwallet/TransferringViewModel.swift +++ /dev/null @@ -1,14 +0,0 @@ -import Foundation - -class TransferringViewModel: ObservableObject { - // MARK: - Combine Variables - - @Published - var shouldStartTransfer: Bool = false - - init() {} - - func shouldDismissView(completion: @escaping () -> Void) { - completion() - } -} diff --git a/loafwallet/View+Extension.swift b/loafwallet/View+Extension.swift index 3bb282acc..25c9fd9d9 100644 --- a/loafwallet/View+Extension.swift +++ b/loafwallet/View+Extension.swift @@ -2,22 +2,6 @@ import Foundation import SwiftUI extension View { - /// Login Alert View - /// - Parameters: - /// - isShowingLoginAlert: Shown when user is waiting to login - /// - didFail: failed to login (false) - /// - message: Error message - /// - Returns: a constructed View - func loginAlertView(isShowingLoginAlert: Binding, - didFail: Binding, - message: Binding) -> some View - { - loafwallet.LoginCardAlertView(isShowingLoginAlert: isShowingLoginAlert, - didFail: didFail, - mainMessage: message, - presenting: self) - } - /// Forgot Password View Modal /// - Parameters: /// - isShowingForgot: Boolean to show/hide the modal @@ -33,37 +17,6 @@ extension View { mainMessage: message) } - /// Registration View Modal - /// - Parameters: - /// - shouldStartRegistering: Boolean to show/hide the modal - /// - didRegister: Boolean fali/success - /// - data: User data for the registration - /// - message: Message details - /// - Returns: RegistrationView - func registeredAlertView(shouldStartRegistering: Binding, - didRegister: Binding, - data _: [String: Any], - message: Binding) -> some View - { - loafwallet.RegistrationAlertView(shouldStartRegistering: shouldStartRegistering, - didRegister: didRegister, - mainMessage: message, - presenting: self) - } - - /// Enter 2FA View Modal - /// - Parameters: - /// - shouldShowEnter2FAView: Boolean to show/hide the modal - /// - twoFAModel: The observable model - /// - Returns: Enter2FAView - func enter2FACodeView(shouldShowEnter2FAView: Binding, - twoFAModel: Enter2FACodeViewModel) -> some View - { - loafwallet.Enter2FACodeView(twoFAViewModel: twoFAModel, - shouldShowEnter2FAView: shouldShowEnter2FAView, - presenting: self) - } - /// From Stack Overflow /// https://stackoverflow.com/questions/56760335/round-specific-corners-swiftui diff --git a/loafwallet/src/Constants/Constants.swift b/loafwallet/src/Constants/Constants.swift index d0728ca6b..e86940d4b 100644 --- a/loafwallet/src/Constants/Constants.swift +++ b/loafwallet/src/Constants/Constants.swift @@ -1,6 +1,8 @@ import UIKit let π: CGFloat = .pi +let customUserAgent: String = "litewallet-ios" +let litecoinCardURL: String = "https://litecoin.dashboard.getblockcard.com/" /// Sets tthe wallet type, the image and the label enum WalletType: String { diff --git a/loafwallet/src/Platform/Extensions.swift b/loafwallet/src/Platform/Extensions.swift index bdf1641f8..b8d1d1653 100644 --- a/loafwallet/src/Platform/Extensions.swift +++ b/loafwallet/src/Platform/Extensions.swift @@ -511,7 +511,6 @@ extension UIImage { } /// Scales an image to fit within a bounds with a size governed by the passed size. Also keeps the aspect ratio. - /// /// - parameters: /// - newSize: the size of the bounds the image must fit within. /// - scalingMode: the desired scaling mode diff --git a/loafwallet/src/Strings/de.lproj/Localizable.strings b/loafwallet/src/Strings/de.lproj/Localizable.strings index d2b14bea1..2ad8603ac 100755 --- a/loafwallet/src/Strings/de.lproj/Localizable.strings +++ b/loafwallet/src/Strings/de.lproj/Localizable.strings @@ -974,7 +974,7 @@ "Send.UnstoppableDomains.simpleplaceholder" = "Domäne eingeben"; /* UDSystemError */ -"Send.UnstoppableDomains.udSystemError" = "System-Lookup-Problem. [Error: %2$d]"; +"Send.UnstoppableDomains.udSystemError" = "Problem mit der Systemsuche. [Fehler: %2$d]"; /* Adress already used alert message - first part */ "Send.UsedAddress.firstLine" = "Litecoin-Adressen sind lediglich zur einmaligen Benutzung vorgesehen."; diff --git a/loafwallet/src/Strings/ja.lproj/Localizable.strings b/loafwallet/src/Strings/ja.lproj/Localizable.strings index dac328e92..1900f7613 100755 --- a/loafwallet/src/Strings/ja.lproj/Localizable.strings +++ b/loafwallet/src/Strings/ja.lproj/Localizable.strings @@ -974,7 +974,7 @@ "Send.UnstoppableDomains.simpleplaceholder" = "ドメインを入力"; /* UDSystemError */ -"Send.UnstoppableDomains.udSystemError" = "システムルックアップの問題。 [エラー: %2$d]"; +"Send.UnstoppableDomains.udSystemError" = "システム ルックアップの問題。 [エラー: %2$d]"; /* Adress already used alert message - first part */ "Send.UsedAddress.firstLine" = "リテコインアドレスは、個人利用のみを想定しています。"; diff --git a/loafwallet/src/Strings/ko.lproj/Localizable.strings b/loafwallet/src/Strings/ko.lproj/Localizable.strings index 6c692708c..0853e32b8 100755 --- a/loafwallet/src/Strings/ko.lproj/Localizable.strings +++ b/loafwallet/src/Strings/ko.lproj/Localizable.strings @@ -974,7 +974,7 @@ "Send.UnstoppableDomains.simpleplaceholder" = "도메인 입력"; /* UDSystemError */ -"Send.UnstoppableDomains.udSystemError" = "시스템 조회 문제입니다. [오류 : %2$d]"; +"Send.UnstoppableDomains.udSystemError" = "시스템 조회 문제. [오류: %2$d]"; /* Adress already used alert message - first part */ "Send.UsedAddress.firstLine" = "Litecoin 주소는 일회용입니다."; diff --git a/loafwallet/src/Strings/ru.lproj/Localizable.strings b/loafwallet/src/Strings/ru.lproj/Localizable.strings index 84e422800..6bd7a1b7a 100755 --- a/loafwallet/src/Strings/ru.lproj/Localizable.strings +++ b/loafwallet/src/Strings/ru.lproj/Localizable.strings @@ -974,7 +974,7 @@ "Send.UnstoppableDomains.simpleplaceholder" = "Введите домен"; /* UDSystemError */ -"Send.UnstoppableDomains.udSystemError" = "Проблема с поиском в системе. [Ошибка: %2$d]"; +"Send.UnstoppableDomains.udSystemError" = "Проблема поиска в системе. [Ошибка: %2$d]"; /* Adress already used alert message - first part */ "Send.UsedAddress.firstLine" = "Биткойн-адреса предназначены исключительно для однократного использования."; diff --git a/loafwallet/src/Strings/zh-Hans.lproj/Localizable.strings b/loafwallet/src/Strings/zh-Hans.lproj/Localizable.strings index 15886421b..92320f8b9 100755 --- a/loafwallet/src/Strings/zh-Hans.lproj/Localizable.strings +++ b/loafwallet/src/Strings/zh-Hans.lproj/Localizable.strings @@ -974,7 +974,7 @@ "Send.UnstoppableDomains.simpleplaceholder" = "输入域"; /* UDSystemError */ -"Send.UnstoppableDomains.udSystemError" = "系统查找问题。 [错误: %2$d]"; +"Send.UnstoppableDomains.udSystemError" = "系统查找问题。 [错误:%2$d]"; /* Adress already used alert message - first part */ "Send.UsedAddress.firstLine" = "莱特币地址仅供一次性使用。"; diff --git a/loafwallet/src/Strings/zh-Hant.lproj/Localizable.strings b/loafwallet/src/Strings/zh-Hant.lproj/Localizable.strings index be07d3077..66951579c 100755 --- a/loafwallet/src/Strings/zh-Hant.lproj/Localizable.strings +++ b/loafwallet/src/Strings/zh-Hant.lproj/Localizable.strings @@ -974,7 +974,7 @@ "Send.UnstoppableDomains.simpleplaceholder" = "輸入域"; /* UDSystemError */ -"Send.UnstoppableDomains.udSystemError" = "系統查找問題。 [錯誤: %2$d]"; +"Send.UnstoppableDomains.udSystemError" = "系統查找問題。 [錯誤:%2$d]"; /* Adress already used alert message - first part */ "Send.UsedAddress.firstLine" = "萊特幣位址專供一次性使用。"; diff --git a/loafwallet/src/ViewControllers/RootModals/SendViewController.swift b/loafwallet/src/ViewControllers/RootModals/SendViewController.swift index 07fb2b77c..d7c279b9f 100644 --- a/loafwallet/src/ViewControllers/RootModals/SendViewController.swift +++ b/loafwallet/src/ViewControllers/RootModals/SendViewController.swift @@ -10,6 +10,7 @@ private let verticalButtonPadding: CGFloat = 15.0 private let buttonSize = CGSize(width: 52.0, height: 32.0) let swiftUICellPadding = 12.0 + class SendViewController: UIViewController, Subscriber, ModalPresentable, Trackable { // MARK: - Public diff --git a/loafwalletTests/Card Tests/CardTests.swift b/loafwalletTests/Card Tests/CardTests.swift deleted file mode 100644 index 7cdfa9d98..000000000 --- a/loafwalletTests/Card Tests/CardTests.swift +++ /dev/null @@ -1,54 +0,0 @@ -// -// CardTests.swift -// loafwalletTests -// -// Created by Kerry Washington on 5/9/21. -// Copyright © 2021 Litecoin Foundation. All rights reserved. -// -// -import Firebase -@testable import loafwallet -import XCTest - -class CardTests: XCTestCase { - var sharedAppDelegate = AppDelegate() - - func testCheckUserIsExUSA() throws { - let 🇲🇽 = Locale(identifier: "mx_MX") - let 🇮🇩 = Locale(identifier: "id_ID") - let 🇷🇺 = Locale(identifier: "ru_RU") - let 🇧🇷 = Locale(identifier: "br_BR") - let 🇹🇷 = Locale(identifier: "tr_TR") - let 🇨🇳 = Locale(identifier: "cn_CN") - let 🇯🇵 = Locale(identifier: "jp_JP") - let 🇪🇸 = Locale(identifier: "es_ES") - let 🇩🇪 = Locale(identifier: "de_DE") - - let arrayOfLocales = [🇲🇽, 🇮🇩, 🇷🇺, 🇧🇷, 🇹🇷, 🇨🇳, 🇯🇵, 🇪🇸, 🇩🇪] - - arrayOfLocales.forEach { locale in - sharedAppDelegate.updateCurrentUserLocale(localeId: locale.identifier) - XCTAssertFalse(UserDefaults.userIsInUSA) - } - } - - func testCheckUserIsBilingualInUSA() throws { - let 🇺🇸 = Locale(identifier: "en_US") - let 🇲🇽🇺🇸 = Locale(identifier: "mx_US") - let 🇮🇩🇺🇸 = Locale(identifier: "id_US") - let 🇷🇺🇺🇸 = Locale(identifier: "ru_US") - let 🇧🇷🇺🇸 = Locale(identifier: "br_US") - let 🇹🇷🇺🇸 = Locale(identifier: "tr_US") - let 🇨🇳🇺🇸 = Locale(identifier: "cn_US") - let 🇯🇵🇺🇸 = Locale(identifier: "jp_US") - let 🇪🇸🇺🇸 = Locale(identifier: "es_US") - let 🇩🇪🇺🇸 = Locale(identifier: "de_US") - - let arrayOfLocales = [🇺🇸, 🇲🇽🇺🇸, 🇮🇩🇺🇸, 🇷🇺🇺🇸, 🇧🇷🇺🇸, 🇹🇷🇺🇸, 🇨🇳🇺🇸, 🇯🇵🇺🇸, 🇪🇸🇺🇸, 🇩🇪🇺🇸] - - arrayOfLocales.forEach { locale in - sharedAppDelegate.updateCurrentUserLocale(localeId: locale.identifier) - XCTAssertTrue(UserDefaults.userIsInUSA) - } - } -} diff --git a/loafwalletTests/Class Tests/AmountTests.swift b/loafwalletTests/Class Tests/AmountTests.swift index 1476e71bb..afb3cd6ac 100644 --- a/loafwalletTests/Class Tests/AmountTests.swift +++ b/loafwalletTests/Class Tests/AmountTests.swift @@ -2,30 +2,18 @@ import XCTest class AmountTests: XCTestCase { - override func setUp() { - // Put setup code here. This method is called before the invocation of each test method in the class. - } + override func setUp() {} - override func tearDown() { - // Put teardown code here. This method is called after the invocation of each test method in the class. - } + override func tearDown() {} - func testAmountString() { - // Given: - // When: - // Then: - } + func testAmountString() {} func testAmountForLtcFormat() { - // //Given: - // let amount = MockSeeds.amount100 -// - // //When: - // if amount.amountForLtcFormat == 0.003 { - // XCTAssertFalse(true) - // } - // //Then: - // XCTAssert(amount.amount == 0) + // Given: + let amount = MockSeeds.amount100 + + // Then: + XCTAssertFalse(amount.amount == 0) } func testPerformanceExample() { diff --git a/loafwalletTests/Class Tests/LitecoinCardTests/AnimatedCardViewModelTests.swift b/loafwalletTests/Class Tests/LitecoinCardTests/AnimatedCardViewModelTests.swift deleted file mode 100644 index 6c7c299b0..000000000 --- a/loafwalletTests/Class Tests/LitecoinCardTests/AnimatedCardViewModelTests.swift +++ /dev/null @@ -1,18 +0,0 @@ -import Foundation -@testable import loafwallet -import SwiftUI -import XCTest - -class AnimatedCardViewModelTests: XCTestCase { - var viewModel: AnimatedCardViewModel! - - override func setUp() { - super.setUp() - viewModel = AnimatedCardViewModel() - } - - func testCardImageFrontIsFound() throws { - let image = Image(viewModel.imageFront) - XCTAssertNotNil(image) - } -} diff --git a/loafwalletTests/Class Tests/LitecoinCardTests/CardWalletTests.swift b/loafwalletTests/Class Tests/LitecoinCardTests/CardWalletTests.swift deleted file mode 100644 index 66c3bc960..000000000 --- a/loafwalletTests/Class Tests/LitecoinCardTests/CardWalletTests.swift +++ /dev/null @@ -1,108 +0,0 @@ -import Foundation -@testable import loafwallet -import SwiftUI -import XCTest - -class CardWalletTests: XCTestCase { - let mockWalletDetailsResponseData = - """ - { - "user_id": "fbabf1bc-1b32-40e6-b072-a0127c026a86", - "tern_address": "GBI6LADAXTIEOVRTQURCCBP77OVYOI7WBLSMEUXXHWUX7UJRUB4DIXET", - "balance": 0.335425, - "btc_address": "moEStpdJy3WXgvrM4UMEPJpG6cJkPiuJ8u", - "eth_address": "0x08598f771bd2481026369552DdDEE52d2c32AA01", - "bch_address": "bchtest:qrn7u2kpkf6lrudytt74z6qadvse3t6whs370a3pnk", - "ltc_address": "mnUMriUAdmfXbodgbmKgrYsDHbEcu51XxJ", - "created_at": "2020-07-12 23:38:05", - "updated_at": "2020-07-12 23:38:05", - "xrp_tag": 983056520, - "xlm_memo": 503240710, - "bank_balance": null, - "bank_pending_balance": null, - "bank_account_number": null, - "available_balance": 0.335425, - "available_balance_usd": 0, - "withdrawable_balance": 0, - "withdrawable_balance_usd": 0, - "spendable_balance": 0, - "spendable_balance_usd": 0, - "bat_address": "0x08598f771bd2481026369552DdDEE52d2c32AA01", - "usdc_address": "0x08598f771bd2481026369552DdDEE52d2c32AA01", - "usdt_address": "0x08598f771bd2481026369552DdDEE52d2c32AA01", - "pax_address": "0x08598f771bd2481026369552DdDEE52d2c32AA01", - "tusd_address": "0x08598f771bd2481026369552DdDEE52d2c32AA01", - "dai_address": "0x08598f771bd2481026369552DdDEE52d2c32AA01", - "tern_memo": 503240710, - "xlm_address": "GBI6LADAXTIEOVRTQURCCBP77OVYOI7WBLSMEUXXHWUX7UJRUB4DIXET", - "xrp_address": "rE8xLDU9d4UCtqtiH5Tz8aRHMNfq7PQH8c", - "ach_routing_number": null, - "ach_account_status": null - } - """.data(using: .utf8) - - func testDecodeWalletDetails() throws { - do { - let decoder = JSONDecoder() - - guard let data = mockWalletDetailsResponseData - else { - return - } - - let walletDetails = try? decoder.decode(CardWalletDetails.self, from: data) - - XCTAssertNotNil(walletDetails) - } catch { - XCTFail("Decoding failed") - } - } -} - -// DEV: Raw data from user/user_ID/wallet -// Reference in case the schema changes -// { -// "data": { -// "user_id": "fbabf1bc-1b32-40e6-b072-a0127c026a86", -// "tern_address": "GBI6LADAXTIEOVRTQURCCBP77OVYOI7WBLSMEUXXHWUX7UJRUB4DIXET", -// "balance": 0, -// "btc_address": "moEStpdJy3WXgvrM4UMEPJpG6cJkPiuJ8u", -// "eth_address": "0x08598f771bd2481026369552DdDEE52d2c32AA01", -// "bch_address": "bchtest:qrn7u2kpkf6lrudytt74z6qadvse3t6whs370a3pnk", -// "ltc_address": "mnUMriUAdmfXbodgbmKgrYsDHbEcu51XxJ", -// "created_at": "2020-07-12 23:38:05", -// "updated_at": "2020-07-12 23:38:05", -// "xrp_tag": 983056520, -// "xlm_memo": 503240710, -// "bank_balance": null, -// "bank_pending_balance": null, -// "bank_account_number": null, -// "available_balance": 0, -// "available_balance_usd": 0, -// "withdrawable_balance": 0, -// "withdrawable_balance_usd": 0, -// "spendable_balance": 0, -// "spendable_balance_usd": 0, -// "bat_address": "0x08598f771bd2481026369552DdDEE52d2c32AA01", -// "usdc_address": "0x08598f771bd2481026369552DdDEE52d2c32AA01", -// "usdt_address": "0x08598f771bd2481026369552DdDEE52d2c32AA01", -// "pax_address": "0x08598f771bd2481026369552DdDEE52d2c32AA01", -// "tusd_address": "0x08598f771bd2481026369552DdDEE52d2c32AA01", -// "dai_address": "0x08598f771bd2481026369552DdDEE52d2c32AA01", -// "tern_memo": 503240710, -// "xlm_address": "GBI6LADAXTIEOVRTQURCCBP77OVYOI7WBLSMEUXXHWUX7UJRUB4DIXET", -// "xrp_address": "rE8xLDU9d4UCtqtiH5Tz8aRHMNfq7PQH8c", -// "ach_routing_number": null, -// "ach_account_status": null -// }, -// "meta": { -// "version": "1.0.2", -// "received": null, -// "executed": 1617288226373 -// }, -// "response": { -// "code": 200, -// "errors": {}, -// "message": "OK" -// } -// } diff --git a/loafwalletTests/Class Tests/LitecoinCardTests/LoginViewModelTests.swift b/loafwalletTests/Class Tests/LitecoinCardTests/LoginViewModelTests.swift deleted file mode 100644 index 78f542547..000000000 --- a/loafwalletTests/Class Tests/LitecoinCardTests/LoginViewModelTests.swift +++ /dev/null @@ -1,13 +0,0 @@ -import Foundation -@testable import loafwallet -import SwiftUI -import XCTest - -class LoginViewModelTests: XCTestCase { - var viewModel: LoginViewModel! - - override func setUp() { - super.setUp() - viewModel = LoginViewModel() - } -} diff --git a/loafwalletTests/Class Tests/LitecoinCardTests/PreTransferViewModelTests.swift b/loafwalletTests/Class Tests/LitecoinCardTests/PreTransferViewModelTests.swift deleted file mode 100644 index 89377db38..000000000 --- a/loafwalletTests/Class Tests/LitecoinCardTests/PreTransferViewModelTests.swift +++ /dev/null @@ -1,79 +0,0 @@ -import Foundation -import SwiftUI -import UIKit -import XCTest - -@testable import loafwallet - -class PreTransferViewModelTests: XCTestCase { - var viewModel: PreTransferViewModel! - - let smallBalance: Double = 0.0044 - - let bigBalance: Double = 52250.225 - - var walletType: WalletType = .litecoinCard - - override func setUp() { - super.setUp() - - viewModel = PreTransferViewModel(walletType: walletType, - balance: smallBalance) - } - - override func setUpWithError() throws { - // Put setup code here. This method is called before the invocation of each test method in the class. - } - - override func tearDownWithError() throws { - // Put teardown code here. This method is called after the invocation of each test method in the class. - } - - func testExample() throws { - // This is an example of a functional test case. - // Use XCTAssert and related functions to verify your tests produce the correct results. - } - - func testPerformanceExample() throws { - // This is an example of a performance test case. - measure { - // Put the code you want to measure the time of here. - } - } - - func testWalletTypeLitecoinCardDescription() throws { - walletType = .litecoinCard - - let failName = "Noname" - - let uiImageFail = UIImage(named: failName) - - XCTAssertNil(uiImageFail) - - let uiImageSuccess = UIImage(named: walletType.description) - - if let size = uiImageSuccess?.size { - XCTAssertNotNil(size.width > 0, "Litecoin Card image was found") - } else { - XCTFail("Fail to find Image") - } - } - - func testWalletTypeLitewalletDescription() throws { - walletType = .litewallet - - let failName = "Noname" - - let uiImageFail = UIImage(named: failName) - - XCTAssertNil(uiImageFail) - - let uiImageSuccess = UIImage(named: walletType.description) - - if let size = uiImageSuccess?.size { - XCTAssertNotNil(size.width > 0, "Litewallet image was found") - } else { - XCTFail("Fail to find Image") - } - } -} diff --git a/loafwalletTests/Class Tests/LitecoinCardTests/RegistrationViewModelTests.swift b/loafwalletTests/Class Tests/LitecoinCardTests/RegistrationViewModelTests.swift deleted file mode 100644 index cfaf73d0f..000000000 --- a/loafwalletTests/Class Tests/LitecoinCardTests/RegistrationViewModelTests.swift +++ /dev/null @@ -1,74 +0,0 @@ -import Foundation -@testable import loafwallet -import SwiftUI -import XCTest - -class RegistrationViewModelTests: XCTestCase { - var viewModel: RegistrationViewModel! - - let mockRegistrationData = ["firstname": "Firstname", - "lastname": "Lastname", - "email": "myemail@co.com", - "password": "Password9", - "phone": "14047721517", - "country": "US", - "state": "AL", - "city": "Anytown", - "address1": "123 Town", - "zip_code": "95014"] - - let mockBadRegistrationData = ["firstname": "", - "lastname": "Lastname", - "email": "myemail@co", - "password": "Pas", - "phone": "12345670", - "country": "US", - "state": "AL", - "city": "Anytown", - "address1": "123 Town", - "zip_code": ""] - - override func setUp() { - super.setUp() - viewModel = RegistrationViewModel() - } - - func testCountryDataValid() throws { - XCTAssertTrue(mockRegistrationData["country"] == "US") - - // DEV: For US only now - XCTAssertFalse(mockRegistrationData["country"] != "US") - - XCTAssertTrue(viewModel.isDataValid(dataType: .country, - data: mockRegistrationData["country"] as Any)) - } - - func testIfGenericDataValid() throws { - XCTAssertTrue(viewModel.isDataValid(dataType: .genericString, - data: mockRegistrationData["address1"] as Any)) - } - - func testIsEmailDataValid() throws { - XCTAssertTrue(viewModel.isDataValid(dataType: .email, - data: mockRegistrationData["email"] as Any)) - - XCTAssertFalse(viewModel.isDataValid(dataType: .email, - data: mockBadRegistrationData["email"] as Any)) - } - - func testIsPasswordDataValid() throws { - XCTAssertTrue(viewModel.isDataValid(dataType: .password, - data: mockRegistrationData["password"] as Any)) - - XCTAssertFalse(viewModel.isDataValid(dataType: .password, - data: mockBadRegistrationData["password"] as Any)) - } - - func testIsMobileNumberDataValid() throws { - XCTAssertTrue(viewModel.isDataValid(dataType: .mobileNumber, - data: mockRegistrationData["phone"] as Any)) - - XCTAssertFalse(viewModel.isDataValid(dataType: .mobileNumber, - data: mockBadRegistrationData["phone"] as Any)) - } -} diff --git a/loafwalletTests/Class Tests/LitecoinCardTests/TransferAmountViewModelTests.swift b/loafwalletTests/Class Tests/LitecoinCardTests/TransferAmountViewModelTests.swift deleted file mode 100644 index c4a082221..000000000 --- a/loafwalletTests/Class Tests/LitecoinCardTests/TransferAmountViewModelTests.swift +++ /dev/null @@ -1,62 +0,0 @@ -import Foundation -@testable import loafwallet -import SwiftUI -import XCTest - -class TransferAmountViewModelTests: XCTestCase { - var lwPlusviewModel: TransferAmountViewModel! - - var lwlcPlusviewModel: TransferAmountViewModel! - - var cardPlusviewModel: TransferAmountViewModel! - - let walletManager = try! WalletManager(store: Store()) - - override func setUp() { - super.setUp() - - lwPlusviewModel = TransferAmountViewModel(walletType: .litewallet, - litewalletBalance: 520.0, - litewalletAddress: "MVZj7gBRwcVpa9AAWdJm8A3HqTst112eJe", - cardBalance: 0.0, - cardAddress: "MJ4W7NZya4SzE7R6xpEVdamGCimaQYPiWu", - walletManager: walletManager, - store: Store()) - - lwlcPlusviewModel = TransferAmountViewModel(walletType: .litewallet, - litewalletBalance: 520.0, - litewalletAddress: "MVZj7gBRwcVpa9AAWdJm8A3HqTst112eJe", - cardBalance: 0.658, - cardAddress: "MJ4W7NZya4SzE7R6xpEVdamGCimaQYPiWu", - walletManager: walletManager, - store: Store()) - - cardPlusviewModel = TransferAmountViewModel(walletType: .litecoinCard, - litewalletBalance: 0.0, - litewalletAddress: "MVZj7gBRwcVpa9AAWdJm8A3HqTst112eJe", - cardBalance: 0.0555, - cardAddress: "MJ4W7NZya4SzE7R6xpEVdamGCimaQYPiWu", - walletManager: walletManager, - store: Store()) - } - - override func setUpWithError() throws { - // Put setup code here. This method is called before the invocation of each test method in the class. - } - - override func tearDownWithError() throws { - // Put teardown code here. This method is called after the invocation of each test method in the class. - } - - func testExample() throws { - // This is an example of a functional test case. - // Use XCTAssert and related functions to verify your tests produce the correct results. - } - - func testPerformanceExample() throws { - // This is an example of a performance test case. - measure { - // Put the code you want to measure the time of here. - } - } -} diff --git a/loafwalletTests/Class Tests/LitecoinCardTests/TransferringViewModelTests.swift b/loafwalletTests/Class Tests/LitecoinCardTests/TransferringViewModelTests.swift deleted file mode 100644 index fc6b91b09..000000000 --- a/loafwalletTests/Class Tests/LitecoinCardTests/TransferringViewModelTests.swift +++ /dev/null @@ -1,23 +0,0 @@ -import XCTest - -class TransferringViewModelTests: XCTestCase { - override func setUpWithError() throws { - // Put setup code here. This method is called before the invocation of each test method in the class. - } - - override func tearDownWithError() throws { - // Put teardown code here. This method is called after the invocation of each test method in the class. - } - - func testExample() throws { - // This is an example of a functional test case. - // Use XCTAssert and related functions to verify your tests produce the correct results. - } - - func testPerformanceExample() throws { - // This is an example of a performance test case. - measure { - // Put the code you want to measure the time of here. - } - } -} diff --git a/loafwalletTests/Legacy BRTests/WalletInfoTest.swift b/loafwalletTests/Legacy BRTests/WalletInfoTest.swift index b2e6c5521..f11c9e5a7 100644 --- a/loafwalletTests/Legacy BRTests/WalletInfoTest.swift +++ b/loafwalletTests/Legacy BRTests/WalletInfoTest.swift @@ -3,56 +3,3 @@ import XCTest private var walletManager: WalletManager? private var client: BRAPIClient? - -// class WalletInfoTest : XCTestCase { -// -// override class func setUp() { -// clearKeychain() -// deleteDb() -// walletManager = try! WalletManager(store: Store(), dbPath: nil) -// let _ = walletManager?.setRandomSeedPhrase() -// client = walletManager?.apiClient -// } -// -//// func testRecoverWalletInfo() { -//// // 1. Create new wallet info -//// guard let kv = client?.kv else { -//// XCTFail("KV store should exist") -//// return -//// } -//// -//// let walletName = "New Wallet" -//// let _ = try? kv.set(WalletInfo(name: walletName)) -//// let exp = expectation(description: "sync all") -//// -//// // 2. Sync new wallet info to server -//// kv.syncAllKeys { error in -//// -//// // 3. Delete Kv Store and simulatore restore wallet -//// client = nil -//// deleteDb() -//// client = BRAPIClient(authenticator: walletManager!) -//// guard let newKv = client?.kv else { -//// -//// XCTFail("KV store should exist") -//// return -//// } -//// -//// // 4. Fetch wallet info from remote -//// ///Need to be rewritten -////// newKv.syncAllKeys { error in -////// print("ERROR: XXX \(error)") -////// XCTAssertNil(error, "Sync Error should be nil") -////// // 5. Verify fetched wallet info -////// if let info = WalletInfo(kvStore: newKv){ -////// XCTAssert(info.name == walletName, "Wallet name should match") -////// } else { -////// XCTFail("Wallet info should exist") -////// } -////// exp.fulfill() -////// } -//// } -//// waitForExpectations(timeout: 15.0, handler: nil) -//// } -// -// } diff --git a/loafwalletTests/Two Factor Auth Tests/Enter2FACodeViewModelTests.swift b/loafwalletTests/Two Factor Auth Tests/Enter2FACodeViewModelTests.swift deleted file mode 100644 index b58af0b98..000000000 --- a/loafwalletTests/Two Factor Auth Tests/Enter2FACodeViewModelTests.swift +++ /dev/null @@ -1,50 +0,0 @@ -@testable import loafwallet -import XCTest - -class Enter2FACodeViewModelTests: XCTestCase { - var viewModel: Enter2FACodeViewModel! - - override func setUp() { - super.setUp() - viewModel = Enter2FACodeViewModel() - } - - /// Checks the user taps on the closure - func testDidConfirmToken() throws { - viewModel.didConfirmToken { _ in - XCTAssert(true, "Tap did work") - } - } - - /// Checks limit can be changed - func testLimitCanChange() throws { - let viewModelSeven = Enter2FACodeViewModel(limit: 7) - - XCTAssert(viewModelSeven.characterLimit == 7) - } - - /// Check too big token - func testTooBigToken() throws { - let tokenBig = "0123456" - - viewModel.tokenString = tokenBig - - XCTAssert(viewModel.tokenString.count <= 6, "Token truncated to 6 chars") - } - - /// Check 6 digit token - func testSixDigitToken() throws { - let tokenBig = "012345" - - viewModel.tokenString = tokenBig - - XCTAssert(viewModel.tokenString.count == 6, "Token is 6 chars") - } - - /// Check dismissView - func testCheckDismissView() throws { - viewModel.shouldDismissView { - XCTAssert(true, "Dismiss worked") - } - } -}